Author Topic: apt-get upgrade broke libreoffice  (Read 11435 times)

Jeffrey Mark Siskind

  • Newbie
  • *
  • Posts: 11
    • View Profile
apt-get upgrade broke libreoffice
« on: July 14, 2018, 12:57:36 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.

galodoido

  • Full Member
  • ***
  • Posts: 153
    • View Profile
apt-get upgrade broke libreoffice
« Reply #1 on: July 14, 2018, 02:36:24 pm »
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.
« Last Edit: August 14, 2018, 05:11:36 pm by speculatrix »

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
apt-get upgrade broke libreoffice
« Reply #2 on: July 14, 2018, 04:14:46 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.

Jeffrey Mark Siskind

  • Newbie
  • *
  • Posts: 11
    • View Profile
apt-get upgrade broke libreoffice
« Reply #3 on: July 14, 2018, 04:24:29 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.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
apt-get upgrade broke libreoffice
« Reply #4 on: July 14, 2018, 04:35:45 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?

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
apt-get upgrade broke libreoffice
« Reply #5 on: July 14, 2018, 05:40:34 pm »
Quote from: Jeffrey Mark Siskind
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.
Gemini 4G Debian
OpenPandora with Debian

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
apt-get upgrade broke libreoffice
« Reply #6 on: July 14, 2018, 07:02:48 pm »
Try:
apt-get -o Dpkg::Options::="--force-overwrite" -f install

Afterwards continue with:
apt-get upgrade
« Last Edit: July 14, 2018, 07:08:26 pm by mithrandir »

racerx187

  • Newbie
  • *
  • Posts: 6
    • View Profile
apt-get upgrade broke libreoffice
« Reply #7 on: July 15, 2018, 01:31:41 am »
$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-overwrite libreoffice*
$ sudo apt install -f

should take care of it for you!

frnzndr

  • Newbie
  • *
  • Posts: 13
    • View Profile
apt-get upgrade broke libreoffice
« Reply #8 on: July 15, 2018, 09:44:57 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.
« Last Edit: July 15, 2018, 09:45:34 am by frnzndr »

jakfish

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
apt-get upgrade broke libreoffice
« Reply #9 on: July 15, 2018, 11:54:59 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

bled82

  • Newbie
  • *
  • Posts: 25
    • View Profile
apt-get upgrade broke libreoffice
« Reply #10 on: July 16, 2018, 01:38:30 pm »
Quote from: jakfish
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

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
apt-get upgrade broke libreoffice
« Reply #11 on: August 14, 2018, 05:17:57 pm »
Quote from: mithrandir
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.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Jess R

  • Newbie
  • *
  • Posts: 12
    • View Profile
apt-get upgrade broke libreoffice
« Reply #12 on: November 07, 2018, 12:34:07 pm »
Quote from: Jeffrey Mark Siskind
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

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
apt-get upgrade broke libreoffice
« Reply #13 on: November 07, 2018, 02:33:59 pm »
good job, Jess R, nice to know there's other ways to fix this.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Meganerd

  • Newbie
  • *
  • Posts: 34
    • View Profile
apt-get upgrade broke libreoffice
« Reply #14 on: November 09, 2018, 09:47:58 pm »
Quote from: racerx187
$ 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!