Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

apt stuck with libreoffice errors

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
iammyr
Posts: 17
Joined: 2008-06-14 08:39

apt stuck with libreoffice errors

#1 Post by iammyr »

Hi everyone,

I've been trying every possible solution I've found online which worked for others in my same situation. But none of them has so far worked for me. So, I'd truly appreciate any help from you: thanks a million!

it all started when I did a --purge remove zend* in order to get rid of the following error always popping up at the end of apt-get update:
W: GPG error: http://repos.zend.com server Release: The following signatures were invalid: BADSIG 2EAE1437F7D2C623 Infra team <zp-infra@zend.com>
and then loads of packages got removed. I did the mistake not to check them all beforehand, so that also gnome got removed and at the next reboot I had to reinstall it (I had no GUI). This caused some mess with libreoffice so that now I do have a GUI etc. but whenever I run apt-get upgrade I get:
The following packages have unmet dependencies:
libreoffice-core : Depends: libreoffice-common (> 1:3.5.4+dfsg2) but it is not installed
libreoffice-filter-binfilter : Depends: libreoffice-common (>= 1:3.4.0~) but it is not installed
libreoffice-java-common : Depends: libreoffice-common but it is not installed
E: Unmet dependencies. Try using -f.
If I try to run apt-get -f install, it doesn't work because of:
dpkg: error processing /var/cache/apt/archives/libreoffice-common_1%3a3.5.4+dfsg2-0+deb7u2_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice4.0-freedesktop-menus 4.0-9703
rmdir: failed to remove `/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice/share/': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
So I tried to create the missing directories and empty the non-empty ones so that /var/lib/libreoffice only contains the dirs "program" and "share" and "share" contains only the dir "prereg". Then I tried to run:
sudo dpkg --purge libreoffice-base-core
sudo dpkg --purge libreoffice-calc
sudo dpkg --purge libreoffice-common
sudo dpkg --purge libreoffice-core
sudo dpkg --purge libreoffice-draw
sudo dpkg --purge libreoffice-emailmerge
sudo dpkg --purge libreoffice-filter-binfilter
sudo dpkg --purge libreoffice-gnome
sudo dpkg --purge libreoffice-gtk
sudo dpkg --purge libreoffice-impress
sudo dpkg --purge libreoffice-java-common
sudo dpkg --purge libreoffice-math
sudo dpkg --purge libreoffice-style-galaxy
sudo dpkg --purge libreoffice-style-tango
sudo dpkg --purge libreoffice-writer python-uno
in order to remove all the packages that were giving me troubles with dependencies (so that I could reinstall them afresh). Then tried again apt-get -f install but I get again:
dpkg: error processing /var/cache/apt/archives/libreoffice-common_1%3a3.5.4+dfsg2-0+deb7u2_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice4.0-freedesktop-menus 4.0-9703
rmdir: failed to remove `/var/lib/libreoffice/share/': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
This issue is quite critical because it hinders me to upgrade the system or install anything via apt.

Thank you so much and loads of good karma to you!!

User avatar
Moonshine
Posts: 38
Joined: 2015-02-11 22:10
Location: Kyiv, Ukraine

Re: apt stuck with libreoffice errors

#2 Post by Moonshine »

iammyr wrote: Then tried again apt-get -f install but I get again:
dpkg: error processing /var/cache/apt/archives/libreoffice-common_1%3a3.5.4+dfsg2-0+deb7u2_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice4.0-freedesktop-menus 4.0-9703
rmdir: failed to remove `/var/lib/libreoffice/share/': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
This issue is quite critical because it hinders me to upgrade the system or install anything via apt.

Thank you so much and loads of good karma to you!!

How about:

Code: Select all

rm /usr/bin/soffice
rm -r /var/lib/libreoffice
You can reinstall Libreoffice again after this.

edit Actually, scratch that:
trying to overwrite '/usr/bin/soffice', which is also in package openoffice4.0-freedesktop-menus 4.0-9703
What is this package? Do you have it installed? If yes, why do you need it?

ychaouche
Posts: 87
Joined: 2014-12-11 09:45

Re: apt stuck with libreoffice errors

#3 Post by ychaouche »

Yes, it all seems like you once installed openoffice or upgraded from it to libreoffice maybe ? so possibly remove openoffice ? (properly, I mean apt-get remove openoffice, --purge if needed)

iammyr
Posts: 17
Joined: 2008-06-14 08:39

Re: apt stuck with libreoffice errors

#4 Post by iammyr »

Thank you so much ychaouche and Moonshine!

I followed all your suggestions and now apt is back to working :)

I run:

Code: Select all

rm /usr/bin/soffice
rm -r /var/lib/libreoffice
dpkg --purge openoffice
dpkg --purge openoffice4.0-freedesktop-menus

thanks a million again ;)

ychaouche
Posts: 87
Joined: 2014-12-11 09:45

Re: apt stuck with libreoffice errors

#5 Post by ychaouche »

No problem, you seem so happy now :)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: apt stuck with libreoffice errors

#6 Post by stevepusser »

However.....you mention you were getting a GPG error message from the zend repository, which you must have added to your software sources somehow. Removing any packages from a repository will not disable that repository, so that error will persist. You'll either have to remove it manually, or in Synaptic if you'd like to use a GUI. It's also possible you can add the key for that repo, but you need to do your own research for that.
MX Linux packager and developer

iammyr
Posts: 17
Joined: 2008-06-14 08:39

Re: apt stuck with libreoffice errors

#7 Post by iammyr »

Hi stevepusser,

I've actually solved that, too. I don't need Zend anymore so I got rid of that error by removing the zend repo from my /etc/apt/sources.list and by removing /etc/apt/sources.list.d/zend.list
thanks ;)

Post Reply