apt stuck with libreoffice errors

Kernels & Hardware, configuring network, installing services

apt stuck with libreoffice errors

Postby iammyr » 2015-02-18 14:25

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!!
iammyr
 
Posts: 17
Joined: 2008-06-14 08:39

Re: apt stuck with libreoffice errors

Postby Moonshine » 2015-02-18 14:46

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?
User avatar
Moonshine
 
Posts: 38
Joined: 2015-02-11 22:10
Location: Kyiv, Ukraine

Re: apt stuck with libreoffice errors

Postby ychaouche » 2015-02-18 15:36

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)
ychaouche
 
Posts: 62
Joined: 2014-12-11 09:45

Re: apt stuck with libreoffice errors

Postby iammyr » 2015-02-18 17:00

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 ;)
iammyr
 
Posts: 17
Joined: 2008-06-14 08:39

Re: apt stuck with libreoffice errors

Postby ychaouche » 2015-02-18 17:04

No problem, you seem so happy now :)
ychaouche
 
Posts: 62
Joined: 2014-12-11 09:45

Re: apt stuck with libreoffice errors

Postby stevepusser » 2015-02-18 19:01

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Clipgrab 3.8.6, Hedgewars 1.0.0, PulseEffects 4.6.8, Telegram-desktop 1.8.15, Pale Moon 28.7.2, KeepassXC 2.5.1
User avatar
stevepusser
 
Posts: 11298
Joined: 2009-10-06 05:53

Re: apt stuck with libreoffice errors

Postby iammyr » 2015-02-18 19:08

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 ;)
iammyr
 
Posts: 17
Joined: 2008-06-14 08:39


Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable