I was trying to install kubuntu-desktop, and in counted an error with LibreOffice. I can no longer install packages with apt, and when I try using sudo apt install -f. Anytime I try to do anything with apt I get the error
Reading package lists... Done
Building dependency tree
Reading state information... Done
kubuntu-desktop is already the newest version (1.398).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libreoffice-core : Depends: libreoffice-common (> 1:6.4.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt install -f
returns
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libreoffice-common
The following NEW packages will be installed:
libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
Need to get 0 B/23.5 MB of archives.
After this operation, 56.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 349645 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a6.4.6-0ubuntu0.20.04.1_all.deb ...
Unpacking libreoffice-common (1:6.4.6-0ubuntu0.20.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.4.6-0ubuntu0.20.04.1_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.8-9803
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.4.6-0ubuntu0.20.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)