Ubuntu: “unmet dependencies”, can't remove AOO or LibreOffice



Question:

So, I recently reinstalled Ubuntu (14.04, because 14.10 was giving some minor problems) on my computer.

I forgot about the problems I had last time I installed OpenOffice alongside LibreOffice, and so tried again having both of them on the same machine (I installed OO first, then LO).

Now, Ubuntu can't even update anymore. It gives a problem I've been able to see solved a few times on the web, the infamous "unmet dependencies". The fact is that I already tried -f install, and it didn't work, removing either openoffice or libreoffice with remove, purge, or similar commands doesn't work either, and all of these commands give back the same problem with the dependencies.

I ask for help: how do I remove any one of these programs, possibly without reinstalling Ubuntu again?

I attach the replies I get for each command I've seen on the web that I've tried already:

$ sudo apt-get -f install  The following packages were automatically installed and are no longer required:    hyphen-it libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-it    libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-it    mythes-en-au mythes-en-us mythes-it  Use 'apt-get autoremove' to remove them.  The following extra packages will be installed:    libreoffice-common  Suggested packages:    libreoffice-style-crystal libreoffice-style-hicontrast    libreoffice-style-human libreoffice-style-oxygen libreoffice-style-sifr    libreoffice-style-tango  The following NEW packages will be installed:    libreoffice-common  0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded.  23 not fully installed or removed.  Need to get 0 B/20,4 MB of archives.  After this operation, 79,2 MB of additional disk space will be used.  Do you want to continue? [Y/n] y  Unpacking libreoffice-common (1:4.4.0~rc3-0ubuntu1~trusty1) ...  dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.4.0~rc3-0ubuntu1~trusty1_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 shared-mime-info (1.2-0ubuntu3) ...  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 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.4.0~rc3-0ubuntu1~trusty1_all.deb  E: Sub-process /usr/bin/dpkg returned an error code (1)  

apt-get autoremove (Even suggested when I entered last command)

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.0~rc3) but it is not installed   libreoffice-help-en-us : Depends: libreoffice-l10n-en-us   libreoffice-java-common : Depends: libreoffice-common but it is not installed   libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not installed   libreoffice-l10n-en-za : Depends: libreoffice-common but it is not installed   libreoffice-l10n-it : Depends: libreoffice-common but it is not installed  E: Unmet dependencies. Try using -f.  

Seeing as this didn't get me anywhere, I even tried "installing" Lo again, since the problem seems to be cause by its missing packages, but I get the same kind of answer. Same goes for trying autoremove, purge, autoclean, etc. If anyone needs it, I can post those lines too.


Solution:1

Try to force remove packages installed with unmet dependencies before running apt-get -f install. In your specific case, you may try:

sudo apt-get -f remove libreoffice-core libreoffice-help-en-us libreoffice-java-common libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-it  

Be sure to look at installed packages and add to command above any OpenOffice.org related package, to prevent other conflicts.

Try also to run sudo apt-get autoremove and sudo apt-get check before trying to run sudo apt-get install -f. Hopefully the last command will find nothing to do, and you'll be able to do a clean install with sudo apt-get install libreoffice. 


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »