LibreOffice 从 6.3.5 升级到 6.4.2 时出错

LibreOffice 从 6.3.5 升级到 6.4.2 时出错

Ubuntu MATE 18.04(Bionic Beaver)我对 LibreOffice 使用以下 PPA:

$ inxi -r | grep libreoffice
           Active apt sources in file: /etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list
           deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic main

今天我尝试将 LibreOffice 从 6.3.5~rc2-0ubuntu0.18.04.1~lo1 升级到 6.4.2-0ubuntu0.18.04.2,升级完成并出现错误:

$ sudo apt update
...
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  uno-libs3
The following NEW packages will be installed:
  libjuh-java libjurt-java libridl-java libuno-cppu3 libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3
  libuno-salhelpergcc3-3 libunoil-java libunoloader-java uno-libs-private
The following packages will be upgraded:
  fonts-opensymbol libasound2 libasound2:i386 libasound2-data libreoffice-avmedia-backend-gstreamer libreoffice-base
  libreoffice-base-core libreoffice-base-drivers libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk3 libreoffice-help-common libreoffice-help-en-gb libreoffice-help-en-us libreoffice-impress
  libreoffice-java-common libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-hr libreoffice-math libreoffice-nlpsolver
  libreoffice-ogltrans libreoffice-pdfimport libreoffice-report-builder libreoffice-report-builder-bin
  libreoffice-script-provider-bsh libreoffice-script-provider-js libreoffice-sdbc-firebird libreoffice-sdbc-hsqldb
  libreoffice-sdbc-postgresql libreoffice-style-colibre libreoffice-style-elementary libreoffice-style-human
  libreoffice-style-tango libreoffice-wiki-publisher libreoffice-writer ure wire-desktop
41 upgraded, 11 newly installed, 1 to remove and 0 not upgraded.
Need to get 170 MB of archives.
After this operation, 7,916 kB disk space will be freed.
Do you want to continue? [Y/n] y
...
Fetched 170 MB in 4min 42s (603 kB/s)
Extracting templates from packages: 100%
(Reading database ... 395606 files and directories currently installed.)
Preparing to unpack .../00-libreoffice-style-tango_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-style-tango (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../01-ure_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking ure (1:6.4.2-0ubuntu0.18.04.2) over (6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../02-libreoffice-avmedia-backend-gstreamer_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-avmedia-backend-gstreamer (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: considering deconfiguration of libreoffice-common, which would be broken by installation of libreoffice-calc ...
dpkg: yes, will deconfigure libreoffice-common (broken by libreoffice-calc)
Preparing to unpack .../03-libreoffice-calc_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
De-configuring libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Unpacking libreoffice-calc (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../04-libreoffice-gnome_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-gnome (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../05-libreoffice-gtk3_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-gtk3 (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../06-libreoffice-impress_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-impress (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../07-libreoffice-writer_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-writer (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: considering deconfiguration of libreoffice-core, which would be broken by installation of libreoffice-draw ...
dpkg: yes, will deconfigure libreoffice-core (broken by libreoffice-draw)
Preparing to unpack .../08-libreoffice-draw_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
De-configuring libreoffice-core (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Unpacking libreoffice-draw (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-core (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: considering deconfiguration of libreoffice-base, which would be broken by installation of libreoffice-core ...
dpkg: yes, will deconfigure libreoffice-base (broken by libreoffice-core)
Preparing to unpack .../09-libreoffice-core_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
De-configuring libreoffice-base (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Unpacking libreoffice-core (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../10-libreoffice-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-common (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-0hnhY0/10-libreoffice-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb (--unpack):
 trying to overwrite '/usr/lib/libreoffice/share/basic/Access2Base/Application.xba', which is also in package libreoffice-base 1:6.3.5~rc2-0ubuntu0.18.04.1~lo1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
rmdir: failed to remove '/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
dpkg: considering deconfiguration of libreoffice-common, which would be broken by installation of libreoffice-base ...
dpkg: yes, will deconfigure libreoffice-common (broken by libreoffice-base)
Preparing to unpack .../11-libreoffice-base_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
De-configuring libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Removing 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base'
Removing 'diversion of /usr/lib/libreoffice/share/basic/script.xlc to /usr/lib/libreoffice/share/basic/script.xlc.noaccess by libreoffice-base'
Unpacking libreoffice-base (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../12-libreoffice-style-elementary_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-style-elementary (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../13-libreoffice-style-colibre_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-style-colibre (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../14-libreoffice-script-provider-js_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-script-provider-js (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../15-libreoffice-script-provider-bsh_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-script-provider-bsh (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../16-libreoffice-report-builder_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-report-builder (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Replacing files in old package libreoffice-common (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../17-libreoffice-pdfimport_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-pdfimport (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../18-libreoffice-ogltrans_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-ogltrans (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../19-libreoffice-l10n-hr_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-l10n-hr (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../20-libreoffice-l10n-en-za_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-l10n-en-za (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../21-libreoffice-l10n-en-gb_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-l10n-en-gb (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../22-libreoffice-java-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-java-common (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../23-libreoffice-help-en-us_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-help-en-us (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../24-libreoffice-help-en-gb_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-help-en-gb (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../25-libreoffice-help-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb ...
Unpacking libreoffice-help-common (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../26-libreoffice-base-drivers_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-base-drivers (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../27-libreoffice-sdbc-hsqldb_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-sdbc-hsqldb (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../28-libreoffice-base-core_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-base-core (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../29-libreoffice-report-builder-bin_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-report-builder-bin (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../30-libreoffice-sdbc-postgresql_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-sdbc-postgresql (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Preparing to unpack .../31-libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-math (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-0hnhY0/31-libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libreoffice/share/config/soffice.cfg/modules/smath/menubar/menubar.xml', which is also in package libreoffice-common 1:6.3.5~rc2-0ubuntu0.18.04.1~lo1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Restoring backup of /usr/share/doc/libreoffice-math ...
Preparing to unpack .../32-libreoffice-sdbc-firebird_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-sdbc-firebird (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-0hnhY0/10-libreoffice-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb
 /tmp/apt-dpkg-install-0hnhY0/31-libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libjuh-java libjurt-java libreoffice-common libreoffice-math libridl-java libuno-cppu3 libuno-cppuhelpergcc3-3
  libuno-purpenvhelpergcc3-3 libuno-sal3 libuno-salhelpergcc3-3 libunoil-java libunoloader-java uno-libs-private
Recommended packages:
  python3-uno
The following packages will be REMOVED:
  uno-libs3
The following NEW packages will be installed:
  libjuh-java libjurt-java libridl-java libuno-cppu3 libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3
  libuno-salhelpergcc3-3 libunoil-java libunoloader-java uno-libs-private
The following packages will be upgraded:
  libreoffice-common libreoffice-math
2 upgraded, 11 newly installed, 1 to remove and 8 not upgraded.
32 not fully installed or removed.
Need to get 0 B/29.2 MB of archives.
After this operation, 32.8 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 395748 files and directories currently installed.)
Preparing to unpack .../libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libreoffice-math (1:6.4.2-0ubuntu0.18.04.2) over (1:6.3.5~rc2-0ubuntu0.18.04.1~lo1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libreoffice/share/config/soffice.cfg/modules/smath/menubar/menubar.xml', which is also in package libreoffice-common 1:6.3.5~rc2-0ubuntu0.18.04.1~lo1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Restoring backup of /usr/share/doc/libreoffice-math ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-math_1%3a6.4.2-0ubuntu0.18.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何解决这个问题?

答案1

在最新的 KDE Neon 上遇到了同样的问题。我相信 LibreOffice Fresh 团队很快就会修复这个损坏的软件包,但与此同时,我设法使用以下命令修复了它:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libreoffice-common_1%3a6.4.2-0ubuntu0.18.04.2_all.deb

  • 这里的关键是--force-overwritedpkg 选项,它解决了尝试覆盖的错误/usr/lib/libreoffice/share/config/soffice.cfg/modules/smath/menubar/menubar.xml,该错误也位于libreoffice-common 1:6.3.5~rc2-0ubuntu0.18.04.1~lo1原始包管理器输出的包中。

运行此命令后,我sudo apt --fix-broken install再次运行以修复不完整的 LibreOffice 安装留下的所有损坏的软件包,这一次它实际上已经完成并正确清理了所有内容。

现在回到 LibreOffice 工作,所以我可以确认它有效(至少在这个系统上)!

答案2

我在 Linux Mint 19.3 上也遇到了同样的情况

请尝试以下方法解决:

  • 开始突触并找到破损的包裹
  • 选择它们并删除
  • 关闭 Synaptic
  • 打开终端并检查$ sudo apt --fix-broken install
  • 如果可以的话,安装 LibreOffice:$ sudo apt --fix-broken install libreoffice

我希望它能帮到你。它对我有用。

答案3

这对我有用:

sudo apt clean
sudo apt autoclean
sudo apt-get -f install

这将清除下载包的缓存并尝试再次安装损坏的依赖项。

答案4

只是

sudo apt install libreoffice
sudo apt --fix-broken install

对我有用。

我的系统是:

18.04.1-KUbuntu 
LibreOffice 6.4.2.2 40(Build:2)

相关内容