Trying to fix broken dependencies (Libre Office)
Solution 1:
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
Solution 2:
If you have this problem do this:
sudo mkdir /usr/bin/soffice
sudo apt-get -f install -y
Solution 3:
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.