Printable Version of Topic

Click here to view this topic in its original format

OESF Portables Forum _ Gemini PDA - Linux OS _ apt-get upgrade broke libreoffice

Posted by: Jeffrey Mark Siskind Jul 14 2018, 08:57 AM

I'm running DebianTP2. I did an apt-get upgrade today. It broke with unmet dependencies that centered on libreoffice. I am in a state where I am unable to install/remove/upgrade packages with apt. So I removed libreoffice.

apt remove libreoffice \
libreoffice-avmedia-backend-gstreamer \
libreoffice-base \
libreoffice-base-core \
libreoffice-base-drivers \
libreoffice-calc \
libreoffice-common \
libreoffice-core \
libreoffice-draw \
libreoffice-gtk2 \
libreoffice-impress \
libreoffice-java-common \
libreoffice-librelogo \
libreoffice-math \
libreoffice-report-builder-bin \
libreoffice-script-provider-python \
libreoffice-style-galaxy \
libreoffice-writer \
python3-uno

Now I am in a state where all of libreoffice is removed except libreoffice-base. If I attempt to do

root@njere:~# apt-get remove libreoffice-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libreoffice-base
0 upgraded, 0 newly installed, 1 to remove and 52 not upgraded.
20 not fully installed or removed.
After this operation, 6356 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 242184 files and directories currently installed.)
Removing libreoffice-base (1:5.2.7-1+deb9u3) ...
dpkg-divert: error: mismatch on package
when removing 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base'
found 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by --add'
dpkg: error processing package libreoffice-base (--remove):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
libreoffice-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@njere:~#

I am close but still not able to install/remove/upgrade packages with apt.

Any ideas on how to fix? Once I get back to a state where apt works and I have a consistent set of package installations, I'll try to figure out how to get libreoffice installed again.

I am running an unmodified /etc/apt/sources.list* from DebianTP2.

Thanks.

Posted by: galodoido Jul 14 2018, 10:36 AM

I had in the past the same problem , but my gemini( please see other posts ) is damaged, screen problems, micro sim not detected .
Best solution is reflash it again with Debian TP1 . You must substitute the boot image ( If I remember the new image is debian.img, so rename it ) and system image from Debian TP1 and apply all updates. Please see https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP.

There are other dependency problem with other files like libreoffice.

Good luck.

Posted by: Adam Boardman Jul 14 2018, 12:14 PM

Its a bit extreme to go for a full reinstall, and especially to go back to the original image without the updates.

I did a 'sudo rm /var/lib/dpkg/info/libreoffice-base.postrm' which is probably a little bit brute force but at least lets you remove the package without having to do a full reinstall, its the postrm step that fails so just getting rid of it lets it complete. I'm assuming there must be a proper debian way of handling this that someone else will probably let us know about shortly.

Posted by: Jeffrey Mark Siskind Jul 14 2018, 12:24 PM

Is it really true that there are dependency problems in TP2 that are not in TP1?
If so, are these really irrevocable without a reflash?
(I'm not even really sure that I installed TP2. To be precise, I installed what
http://support.planetcom.co.uk/partitionTool.html
gave me.)
I ask because I put in a huge amount of work (about a week) installing and customizing.
I prefer not to have to redo all of this. If I do have to reflash, I will put the Gemini aside and
wait for the dust to settle before going through the hassle of a reinstall and reconfigure.

Posted by: Adam Boardman Jul 14 2018, 12:35 PM

You installed TP2 from the partition tool, TP1 was released ages ago, there is no reason to go back to TP1 as they are the almost the same (once updated), there are tiny tweaks in that the config suggestions on the wiki were implemented in more of a systems level way than user hack, but nothing different in terms of debian packaging dependencies.

It looks like you didn't read my post 10 mins before your one?

Posted by: Eric BF Jul 14 2018, 01:40 PM

QUOTE(Jeffrey Mark Siskind @ Jul 14 2018, 04:57 PM) *
I'm running DebianTP2. I did an apt-get upgrade today. It broke with unmet dependencies that centered on libreoffice. I am in a state where I am unable to install/remove/upgrade packages with apt. So I removed libreoffice.
[...]

I am close but still not able to install/remove/upgrade packages with apt.

Any ideas on how to fix? Once I get back to a state where apt works and I have a consistent set of package installations, I'll try to figure out how to get libreoffice installed again.

I am running an unmodified /etc/apt/sources.list* from DebianTP2.

Thanks.


Aptitude is often quite useful for resolving problems with dependencies. It has a rather arcane user interface (no insult intended to the developers of this tool) but is incredibly powerful. You can examine dependencies for each and every package and the tool can provide alternative means of resolving issues. I find it quite useful in these cases.

Posted by: mithrandir Jul 14 2018, 03:02 PM

Try:
apt-get -o Dpkg::Options::="--force-overwrite" -f install

Afterwards continue with:
apt-get upgrade

Posted by: racerx187 Jul 14 2018, 09:31 PM

$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-overwrite libreoffice*
$ sudo apt install -f

should take care of it for you!


Posted by: frnzndr Jul 15 2018, 05:44 AM

In case none of the above helped, I was able to get things (sort of) working again using this as root (i.e. first sudo su):

for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do dpkg-divert --remove $FILE; done


Got the command from this ubuntu page: https://ubuntuforums.org/showthread.php?t=2388026&page=3

Afterwards I was able to uninstall libreoffice-base and reinstall.

Posted by: jakfish Jul 15 2018, 07:54 AM

Had the exact same problem and used everybody's help:

1) for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do dpkg-divert --remove $FILE; done

which ran properly but still didn't solve libreoffice problem until I also ran:

$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-overwrite libreoffice*
$ sudo apt install -f

Thanks to all,
Jake

Posted by: bled82 Jul 16 2018, 09:38 AM

QUOTE(jakfish @ Jul 15 2018, 10:54 AM) *
Had the exact same problem and used everybody's help:

1) for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do dpkg-divert --remove $FILE; done

which ran properly but still didn't solve libreoffice problem until I also ran:

$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-overwrite libreoffice*
$ sudo apt install -f

Thanks to all,
Jake



The above worked for me also , Thanks everyone !

cd /var/cache/apt/archives/
sudo dpkg -i --force-overwrite libreoffice*
sudo apt install -f

Posted by: speculatrix Aug 14 2018, 01:17 PM

QUOTE(mithrandir @ Jul 15 2018, 12:02 AM) *
Try:
apt-get -o Dpkg::Options::="--force-overwrite" -f install

Afterwards continue with:
apt-get upgrade


I discovered this thread when I hit the same problem. I removed every package I could with "dpkg -P --force-all libreoffice-xxxyyyzzz" but it got stuck on libreoffice-base with the divert error, and then I executed the command above and everything seemed OK.

Posted by: Jess R Nov 7 2018, 09:34 AM

QUOTE(Jeffrey Mark Siskind @ Jul 14 2018, 05:57 PM) *
I'm running DebianTP2. I did an apt-get upgrade today. It broke with unmet dependencies that centered on libreoffice. I am in a state where I am unable to install/remove/upgrade packages with apt. So I removed libreoffice.

apt remove libreoffice \
libreoffice-avmedia-backend-gstreamer \
libreoffice-base \
libreoffice-base-core \
libreoffice-base-drivers \
libreoffice-calc \
libreoffice-common \
libreoffice-core \
libreoffice-draw \
libreoffice-gtk2 \
libreoffice-impress \
libreoffice-java-common \
libreoffice-librelogo \
libreoffice-math \
libreoffice-report-builder-bin \
libreoffice-script-provider-python \
libreoffice-style-galaxy \
libreoffice-writer \
python3-uno

Now I am in a state where all of libreoffice is removed except libreoffice-base. If I attempt to do

root@njere:~# apt-get remove libreoffice-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libreoffice-base
0 upgraded, 0 newly installed, 1 to remove and 52 not upgraded.
20 not fully installed or removed.
After this operation, 6356 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 242184 files and directories currently installed.)
Removing libreoffice-base (1:5.2.7-1+deb9u3) ...
dpkg-divert: error: mismatch on package
when removing 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base'
found 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by --add'
dpkg: error processing package libreoffice-base (--remove):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
libreoffice-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@njere:~#

I am close but still not able to install/remove/upgrade packages with apt.

Any ideas on how to fix? Once I get back to a state where apt works and I have a consistent set of package installations, I'll try to figure out how to get libreoffice installed again.

I am running an unmodified /etc/apt/sources.list* from DebianTP2.

Thanks.



It took me some help and multiple attempts (I gave up and came back to it) to fix this.in the end it was simple, the diversions were created incorrectly, manually remove them:

sudo dpkg-divert --list
sudo dpkg-divert --remove /usr/lib/libreoffice/share/basic/dialog.xlc
<repeat for script.slc>

Jess

Posted by: speculatrix Nov 7 2018, 11:33 AM

good job, Jess R, nice to know there's other ways to fix this.

Posted by: Meganerd Nov 9 2018, 06:47 PM

QUOTE(racerx187 @ Jul 14 2018, 09:31 PM) *
$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-overwrite libreoffice*
$ sudo apt install -f

should take care of it for you!


Worked on Debian TP2
Thanks!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)