4

I uninstalled Libreoffice and installed Openoffice only To find out that I do not like OpenOffice any more. I uninstalled OpenOffice today and tried installing LibreOffice and I got errors.

 The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:4.2.7) 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
 y-ppa-manager : Depends: yad (>= 0.8.0) but it is not installed
                 Depends: python-software-properties but it is not installed

So I tried to do sudo apt-get -f install and I get asked to install and I say yes this is the message.

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libreoffice-common
Suggested packages:
  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 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
41 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 76.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 453874 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a4.2.7-0ubuntu1_all.deb ...
Unpacking libreoffice-common (1:4.2.7-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.2.7-0ubuntu1_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 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 mime-support (3.54ubuntu1) ...
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) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a4.2.7-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I can no longer install anything or update my system.

  • More information is needed, like what version of Ubuntu you are using, and whether or not you are using a ppa. – user7134 Nov 11 '14 at 19:00
  • Ubuntu 14.04, I initally tried installing Libreoffice through the App grid Software – Brandd Newman Nov 11 '14 at 19:46
  • You need to see this..askubuntu.com/questions/691630/… I was having the same problem.. It helped me.. – user301445 May 9 '17 at 16:18
5

I have answered this myself after doing some research and learning some new tricks. I am going to provide the answer in case someone runs into an issue related to these broken dependencies. I used synaptic package manager to remove broken packages. Here is how I did that

First I Downloaded Synaptic Package Manager Synaptic Package Manager

I then moved the downloaded .deb file to my home folder ( for easy terminal access) then proceeded to open terminal

CTRL + ALT + T

I had to install the package via dpkg because apt-get was not working due to broken dependencies

sudo dpkg -i synaptic_0.81.1_amd64.deb

once this was complete I opened up synaptic running the following in terminal

sudo synaptic

Within the Synaptic Package Manager

click on the Status Tab

and then click on Broken and select the packages that are broken. and Mark for Complete Removal and continue to apply the changes.

I also made sure everything was completely removed by using the following in terminal

sudo apt-get autoremove

and double checking the packages in synaptic package manager

there was no left over libre office packages so I continued to install Libre Office through Ubuntu Software Center

| improve this answer | |
3

If you have this problem do this:

sudo mkdir /usr/bin/soffice
sudo apt-get -f install -y
| improve this answer | |
2

I understand this happened years ago, but I had a similar situation with 18.04 LTS (Bionic). My computer was stuck, not updates, installs...nothing. So......

The only way I solved the problem was by installing the package named libreoffice-common. This is where I found the dpkg error message displaying:

dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.0.3-0ubuntu1_all.deb (--unpack): trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.4-9788 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 Errors were encountered while processing: /var/cache/apt/archives/libreoffice-common_1%3a6.0.3-0ubuntu1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)"

I had to carefully read the error message. It was letting me know that another application by the name of openoffice-debian-menus was using the file located in /usr/bin/soffice. This file could not be overwritten for some reason or another.

So I removed the program using dpkg: sudo dpkg -P openoffice-debian-menus 4.1.4-9788

Installed libreoffice-common: sudo apt install libreoffice-common

Ran updates: sudo apt update && sudo apt list --upgradable

After running the previous command, use the following to verify that you want the packages included in the upgrade: sudo apt show pkgs "Package name". If everything looks fine, run sudo apt full-upgrade && sudo apt autoremove.

I hope everything pans out.

| improve this answer | |
0

Try these, one by one:

sudo apt-get purge openoffice*
sudo apt-get clean && sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get install libreoffice
| improve this answer | |
0

Try:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libreoffice-common_1%3a4.2.7-0ubuntu1_all.deb

Then:

sudo apt-get -f install
sudo ap-get install libreoffice

source: How to resolve "dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb"?

| improve this answer | |

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