4

I tried to install LibreOffice through the software centre but an error occurred and the installation failed. Now it is shown as "installed" in software centre while it's actually not. I realised it was because I have OpenOffice4.1.1 installed. I tried to remove OpenOffice but so far none of the commands I found on any of the internet forums worked.

The software centre is now stuck in a loop of repairing and failing to repair the problem caused by OpenOffice. Now my laptop can neither update nor install other software. I manually removed the all the LibreOffice files in a terminal and hoped that it would stop the process, but of course it didn't. Could someone please let me know how I could stop the installation process of LibreOffice for now? Thanks in advance.

Here is the error I get when software centre tried to repair the problem:

installArchives() failed:
Preparing to unpack .../libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb ...
Unpacking libreoffice-common (1:4.2.8-0ubuntu2) ...
dpkg:
error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.1-9775
rmdir: failed to remove /var/lib/libreoffice/share/prereg/: No such file or directory
rmdir: failed to remove /var/lib/libreoffice/share/: No such file or directory
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
rmdir: failed to remove /var/lib/libreoffice: No such file or directory
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for gnome-icon-theme (3.10.0-0ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb
Error in function: 
dpkg: dependency problems prevent configuration of libreoffice-l10n-en-gb: libreoffice-l10n-en-gb depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-en-gb (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-java-common:  libreoffice-java-common depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-java-common (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-l10n-en-za: libreoffice-l10n-en-za depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-en-za (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-help-en-gb:
 libreoffice-help-en-gb depends on libreoffice-l10n-en-gb; however:
  Package libreoffice-l10n-en-gb is not configured yet.
dpkg: error processing package libreoffice-help-en-gb (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-sdbc-hsqldb:
 libreoffice-sdbc-hsqldb depends on libreoffice-java-common (>= 1:4.2.8~); however:
  Package libreoffice-java-common is not configured yet.
dpkg: error processing package libreoffice-sdbc-hsqldb (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-l10n-ja:
 libreoffice-l10n-ja depends on libreoffice-common; however:
  Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-ja (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-help-en-us:
 libreoffice-help-en-us depends on libreoffice-l10n-en-us; however:
  Package libreoffice-l10n-en-us is not installed.
dpkg: error processing package libreoffice-help-en-us (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-core:
 libreoffice-core depends on libreoffice-common (>> 1:4.2.8); however:
  Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-uno:
 python3-uno depends on libreoffice-core (= 1:4.2.8-0ubuntu2); however:
  • It looks like broken packages. Run 'sudo apt-get install -f' and let APT do its thing, then try again if necessary (removing OpenOffice first), – John Scott Jun 9 '15 at 17:56
  • Try a sudo apt-get purge openoffice-debian-menus and give me a ping with @A.B. – A.B. Jun 9 '15 at 17:57
  • Thanks you TuzzyToothpast and A.B. ! Everything is fine now. @A.B. Thank you for your help. Could you let me know why "apt-get purge openoffice*" couldn't work? I thought the * would cover all the variations of the name. – Minerva Jun 9 '15 at 18:18
  • apt-get purge "openoffice*" – A.B. Jun 9 '15 at 18:24
  • possible duplicate of dpkg error: "trying to overwrite file, which is also in..." – karel Jun 9 '15 at 20:14
3

This is the problem:

trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.1-9775

Therefore open a terminal and remove the package openoffice-debian-menus with the command

sudo apt-get purge openoffice-debian-menus

After that repair your installation:

sudo apt-get install -f
1

Just run this command :

sudo apt-get remove --purge libreoffice-core libreoffice-common python3-uno libreoffice-*

as libreoffice and openoffice use same soffice so the error is there.

1

This worked for me:

sudo apt-get remove --purge libreoffice-core libreoffice-common unoconv python3-uno libreoffice-*

It seems that unoconv broke something and prevented to remove its own package which depends on libreoffice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.