Ubuntu手动升级Libreoffice

每一个打工仔,电脑上都要装上一个办公套件,除了常见的WPS Office、Microsoft Office外,对Linux用户来说Libreoffice也是个不错的选择,通常系统默认的Libreoffice版本都落后官方,想体验新功能则需要自己动手,去官网下载最新安装包升级,下面以deb系为例,演示升级过程。

1. 下载最新deb安装包

官网下载后的deb包, 形如 LibreOffice_$version_Linux_x86-deb.tar.gz

1➜  soft ls -al LibreOffice_7.5.0_Linux_x86-64_deb.tar.gz
2-rw-rw-r-- 1 mephisto mephisto 198614921 Feb  3 14:42 LibreOffice_7.5.0_Linux_x86-64_deb.tar.gz

2. 解压、安装

解压后,切换到DEBS目录,然后 sudo dpkg -i *.deb 安装即可,有耐心的可以先读下readmes文件。

 1➜  tar -xvf LibreOffice_7.5.0_Linux_x86-64_deb.tar.gz
 2➜  soft cd LibreOffice_7.5.0.3_Linux_x86-64_deb
 3➜  LibreOffice_7.5.0.3_Linux_x86-64_deb ls
 4DEBS  readmes
 5➜  LibreOffice_7.5.0.3_Linux_x86-64_deb cd DEBS
 6➜  DEBS ls
 7libobasis7.5-base_7.5.0.3-3_amd64.deb                                  libobasis7.5-images_7.5.0.3-3_amd64.deb                  libobasis7.5-xsltfilter_7.5.0.3-3_amd64.deb
 8libobasis7.5-calc_7.5.0.3-3_amd64.deb                                  libobasis7.5-impress_7.5.0.3-3_amd64.deb                 libreoffice7.5_7.5.0.3-3_amd64.deb
 9libobasis7.5-core_7.5.0.3-3_amd64.deb                                  libobasis7.5-kde-integration_7.5.0.3-3_amd64.deb         libreoffice7.5-base_7.5.0.3-3_amd64.deb
10libobasis7.5-draw_7.5.0.3-3_amd64.deb                                  libobasis7.5-librelogo_7.5.0.3-3_amd64.deb               libreoffice7.5-calc_7.5.0.3-3_amd64.deb
11libobasis7.5-en-us_7.5.0.3-3_amd64.deb                                 libobasis7.5-libreofficekit-data_7.5.0.3-3_amd64.deb     libreoffice7.5-debian-menus_7.5.0-3_all.deb
12libobasis7.5-extension-beanshell-script-provider_7.5.0.3-3_amd64.deb   libobasis7.5-math_7.5.0.3-3_amd64.deb                    libreoffice7.5-dict-en_7.5.0.3-3_amd64.deb
13libobasis7.5-extension-javascript-script-provider_7.5.0.3-3_amd64.deb  libobasis7.5-ogltrans_7.5.0.3-3_amd64.deb                libreoffice7.5-dict-es_7.5.0.3-3_amd64.deb
14libobasis7.5-extension-mediawiki-publisher_7.5.0.3-3_amd64.deb         libobasis7.5-onlineupdate_7.5.0.3-3_amd64.deb            libreoffice7.5-dict-fr_7.5.0.3-3_amd64.deb
15libobasis7.5-extension-nlpsolver_7.5.0.3-3_amd64.deb                   libobasis7.5-ooofonts_7.5.0.3-3_amd64.deb                libreoffice7.5-draw_7.5.0.3-3_amd64.deb
16libobasis7.5-extension-pdf-import_7.5.0.3-3_amd64.deb                  libobasis7.5-ooolinguistic_7.5.0.3-3_amd64.deb           libreoffice7.5-en-us_7.5.0.3-3_amd64.deb
17libobasis7.5-extension-report-builder_7.5.0.3-3_amd64.deb              libobasis7.5-postgresql-sdbc_7.5.0.3-3_amd64.deb         libreoffice7.5-impress_7.5.0.3-3_amd64.deb
18libobasis7.5-firebird_7.5.0.3-3_amd64.deb                              libobasis7.5-python-script-provider_7.5.0.3-3_amd64.deb  libreoffice7.5-math_7.5.0.3-3_amd64.deb
19libobasis7.5-gnome-integration_7.5.0.3-3_amd64.deb                     libobasis7.5-pyuno_7.5.0.3-3_amd64.deb                   libreoffice7.5-ure_7.5.0.3-3_amd64.deb
20libobasis7.5-graphicfilter_7.5.0.3-3_amd64.deb                         libobasis7.5-writer_7.5.0.3-3_amd64.deb                  libreoffice7.5-writer_7.5.0.3-3_amd64.deb
21➜  DEBS pwd
22/home/mephisto/Downloads/soft/LibreOffice_7.5.0.3_Linux_x86-64_deb/DEBS
23➜  DEBS sudo dpkg -i *.deb

3. 卸载指定版本

经常升级 Libreoffice 的话,多次安装后会保留多个版本,强迫症一般只会保留想要的版本,这个时候需要删除特定版本

1sudo apt remove libreoffice-\*

或者

1sudo apt remove --purge libreoffice-\*

例如,我要删除7.4这个版本,就匹配删除

1sudo apt remove libreoffice7.4-\*
2sudo apt remove --purge libreoffice7.4-\*

同理,删除所有 sudo apt remove libreoffice*

如有需要可,同样可删除 libobasis 包 sudo apt remove libobasis7.4-\*

这样操作后,每次都能按照自己喜好,选择保留合适的 Libreoffice 版本。

最后修改于: Monday, August 28, 2023
欢迎关注微信公众号,留言交流。

相关文章:

翻译: