0

I'm running Ubuntu 14.04 LTS (64bit) with Libreoffice removed and Openoffice 4.1.0 installed.

My package system is broken and I can't install or un-install anything until I've fixed the problem. I've searched ask-ubuntu and read many 'solutions' to broken dependencies, none of which seem to help my predicament.

Here is what I did to get into the current impasse.

I tried to install the gnome desktop using "Software Center" but I had not realised the desktop installation also attempted to install Libreoffice. Part way through the installation the process spat out an error and stopped. Using "sudo apt-get install -f" gives the output below.

I would like to fix the dependencies so that I can get rid of the broken Libreoffice installation but I don't know where to start.

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libreoffice-help-en-gb libreoffice-help-en-us libreoffice-l10n-en-gb
  libreoffice-l10n-en-za mythes-en-au mythes-en-us
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libreoffice-common
Suggested packages:
  libreoffice-style-breeze libreoffice-style-crystal
  libreoffice-style-hicontrast libreoffice-style-oxygen libreoffice-style-sifr
  libreoffice-style-tango
The following NEW packages will be installed
  libreoffice-common
0 to upgrade, 1 to newly install, 0 to remove and 24 not to upgrade.
23 not fully installed or removed.
Need to get 0 B/22.0 MB of archives.
After this operation, 82.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 266625 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.deb ...
Unpacking libreoffice-common (1:4.4.3~rc2-0ubuntu1~trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1-9764
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 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...
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) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

These are the broken dependencies: 
libreoffice-core: Depends: libreoffice-common (> 1:4.4.3~rc2) but it is not installed 
libreoffice-help-en-us: Depends: libreoffice-l10n-en-us but it is a virtual package 
libreoffice-l10n-en-gb: Depends: libreoffice-common but it is not installed 
libreoffice-l10n-en-za: Depends: libreoffice-common but it is not installed –
JoKeR
  • 6,972
  • 9
  • 43
  • 65
Dave D
  • 23
  • 9

1 Answers1

0

Following this thread and do next:

sudo rm /var/cache/apt/archives/* -vf
sudo apt-get update
sudo apt-get dist-upgrade

if required:

sudo apt-get install --reinstall libreoffice

or purge it and install it back with:

sudo apt-get remove --purge libreoffice
sudo apt-get install libreoffice
JoKeR
  • 6,972
  • 9
  • 43
  • 65
  • I tried your suggestion and it looked promising to start with, then tripped up on the same problem. – Dave D May 25 '15 at 21:39
  • The following packages have unmet dependencies. libreoffice-core : Depends: libreoffice-common (> 1:4.4.3~rc2) but it is not installed libreoffice-help-en-us : Depends: libreoffice-l10n-en-us libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not installed libreoffice-l10n-en-za : Depends: libreoffice-common but it is not installed E: Unmet dependencies. Try using -f. – Dave D May 25 '15 at 21:44
  • Yes I did, same result: sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run ‘apt-get -f install’ to correct these. The following packages have unmet dependencies. libreoffice-core : Depends: libreoffice-common (> 1:4.4.3~rc2) but it is not installed libreoffice-help-en-us : Depends: libreoffice-l10n-en-us libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not installed libreoffice-l10n-en-za : Depends: libreoffice-common but it is not installed E: Unmet dependencies. Try using -f – Dave D May 26 '15 at 23:07
  • I did the dist-upgrade and purge and both gave the unmet dependencies error. – Dave D May 26 '15 at 23:14
  • If I try to reinstall I get this Errors were encountered while processing: /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) – Dave D May 26 '15 at 23:14
  • Yes, sudo rm /var/cache/apt/archives/* -vf sudo apt-get update sudo apt-get dist-upgrade – Dave D May 26 '15 at 23:17
  • sudo dpkg -i --force-overwrite /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.de‌​‌​b dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.de‌​‌​b (--install): cannot access archive: No such file or directory Errors were encountered while processing: /var/cache/apt/archives/libreoffice-common_1%3a4.4.3~rc2-0ubuntu1~trusty1_all.de‌​‌​b – Dave D May 26 '15 at 23:25
  • I still get "cannot access archive: No such file or directory". – Dave D May 26 '15 at 23:32
  • try the above command – JoKeR May 26 '15 at 23:33
  • Lots of "is not installed, so not removed" followed by: `The following packages have unmet dependencies. ... – Dave D May 26 '15 at 23:35
  • I found the same answers already in askubuntu with issues like yours like this http://askubuntu.com/questions/258738/problem-with-update-of-libreoffice and this http://askubuntu.com/questions/525037/cannot-install-packages – JoKeR May 26 '15 at 23:36
  • most probably you have added PPA which you haven't mentioned if so... did you? – JoKeR May 26 '15 at 23:38
  • Yes, as mentioned in OP, I installed OpenOffice (using a PPA). When I attempted to install the gnome desktop it also surprised me by attempting to also install LibreOffice. The LO installation choked half way through, probably tripping over the OO installation. – Dave D May 26 '15 at 23:45
  • So that what was the cause as I can see. Does it work now if you turn PPA off? – JoKeR May 26 '15 at 23:46
  • I don't have time to try that right now. I'll get back to it tomorrow. Thanks for your help. – Dave D May 26 '15 at 23:49
  • Sorry about delayed reply. Yes, PPA was the culprit, but not what I expected. There was a rogue PPA enabled for LibreOffice that I'd not been aware of (I suspected the OpenOffice but it turned out to be turned off already). Disabling the LO PPA allowed me to purge/delete the broken LO installation and fix the broken dependencies. Thanks again for pointing me in the right direction. – Dave D May 28 '15 at 14:16
  • You're welcome! I'm glad we solved this out. – JoKeR May 28 '15 at 16:25