Libreoffice update failure

Today, when updating the Debian OS on my Gemini PDA, the upgrade for libreoffice failed complaining about the file dialog.xlc being present in multiple packages. A similar issue already has occurred with the Gemini PDA half a year ago¹. It is quite probable, that the same problem occurs with other Debian based distributions, as well. But let us have a look into the details first.

The usual update process (apt-get update;apt-get upgrade) resulted in apt complaining about the file dialog.tlc being present in both packages, libreoffice-base and libreoffice-common and failed:

Unpacking libreoffice-base (1:5.2.7-1+deb9u5) over (1:5.2.7-1+deb9u4) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Y89hUD/03-libreoffice-base_1%3a5.2.7-1+deb9u5_arm64.deb (--unpack):
 trying to overwrite '/usr/lib/libreoffice/share/basic/dialog.xlc', which is also in package libreoffice-common 1:5.2.7-1+deb9u4
...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-Y89hUD/03-libreoffice-base_1%3a5.2.7-1+deb9u5_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Every subsequent attempt to upgrade the system fails. The system now is in broken state, that prevents upgrades. In example a second try to run apt upgrade only resulted in the hint to try apt –fix-broken install:

root@gemini:/home/gemini# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice-base : Depends: libreoffice-base-core (= 1:5.2.7-1+deb9u4) but 1:5.2.7-1+deb9u5 is installed
                    Depends: libreoffice-base-drivers (= 1:5.2.7-1+deb9u4) but 1:5.2.7-1+deb9u5 is installed
                    Depends: libreoffice-core (= 1:5.2.7-1+deb9u4) but 1:5.2.7-1+deb9u5 is installed
 libreoffice-core : Breaks: libreoffice-base (< 1:5.2.7-1+deb9u5) but 1:5.2.7-1+deb9u4 is installed
                    Recommends: libpaper-utils but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Unfortunately, running apt –fix-broken install did not solve the problem:

root@gemini:/home/gemini# apt --fix-broken install  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
...
The following packages will be upgraded:
  libreoffice-base
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
22 not fully installed or removed.
Need to get 0 B/1.344 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 125897 files and directories currently installed.)
Preparing to unpack .../libreoffice-base_1%3a5.2.7-1+deb9u5_arm64.deb ...
Unpacking libreoffice-base (1:5.2.7-1+deb9u5) over (1:5.2.7-1+deb9u4) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-base_1%3a5.2.7-1+deb9u5_arm64.deb (--unpack):
 trying to overwrite '/usr/lib/libreoffice/share/basic/dialog.xlc', which is also in package libreoffice-common 1:5.2.7-1+deb9u5
E: Sub-process /usr/bin/dpkg returned an error code (1)<br>

Since the error indicates clearly, that dpkg fails to overwrite the file dialog.xlc, I tried the solution I have used to fix the issue with the libreoffice update half a year ago. So I “instructed” apt-get to overwrite the conflicting files:

apt-get -o Dpkg::Options::=”–force-overwrite” -f install

This finally solved the issue and allowed the libreoffice upgrade to complete:

root@gemini:/home/gemini# apt-get -o Dpkg::Options::="--force-overwrite" -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
...
The following packages will be upgraded:
  libreoffice-base
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
21 not fully installed or removed.
Need to get 0 B/1.344 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 125897 files and directories currently installed.)
Preparing to unpack .../libreoffice-base_1%3a5.2.7-1+deb9u5_arm64.deb ...
Unpacking libreoffice-base (1:5.2.7-1+deb9u5) over (1:5.2.7-1+deb9u4) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/lib/libreoffice/share/basic/dialog.xlc', which is also in package libreoffice-common 1:5.2.7-1+deb9u5
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/lib/libreoffice/share/basic/script.xlc', which is also in package libreoffice-common 1:5.2.7-1+deb9u5
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for shared-mime-info (1.8-1+deb9u1) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Setting up fonts-opensymbol (2:102.7+LibO5.2.7-1+deb9u5) ...
Setting up uno-libs3 (5.2.7-1+deb9u5) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Setting up ure (5.2.7-1+deb9u5) ...
Processing triggers for fontconfig (2.11.0-6.7+b1) ...
Setting up libreoffice-style-galaxy (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-common (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-core (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-gtk2 (1:5.2.7-1+deb9u5) ...
Setting up python3-uno (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-base-drivers (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-draw (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-avmedia-backend-gstreamer (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-java-common (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-script-provider-python (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-impress (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-math (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-base-core (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-calc (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-writer (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-base (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-librelogo (1:5.2.7-1+deb9u5) ...
Setting up libreoffice-report-builder-bin (1:5.2.7-1+deb9u5) ...
Setting up libreoffice (1:5.2.7-1+deb9u5) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...

The referenced thread¹ on oesf.org, regarding the past libreoffice upgrade issue, indicates there are quite some more possibilities that might fix the problem, but this one seems to be the easiest. So if this solution does not work for you, you might want to try one of the other solutions being shown there.

The libreoffice upgrade issue seems to be a reoccurring problem, thus a long term solution should be to fix the debian packages for libreoffice to not inlcude the same file in multiple packages. For the time being, the solution presented here solves the problem and gets the system back into a operational and upgradeable state.

Jürgen

References:
1. oesf.org: apt-get upgrade broke libreoffice

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

siteinfo

Translator