When the new Libreoffice 1:4.3 came out, it was not in the repositories yet, so I decided to install it from ppa http://ppa.launchpad.net/libreoffice/libreoffice-4-3/ubuntu/.
I saw that it is now available in the normal repository, so I uninstalled the ppa version and want to install it from the normal repo.
While uninstalling, an error came up and I was left with a broken package, libreoffice-base, and I don't seem to be able to get rid of it
I tried sudo apt-get -fm remove libreoffice-base (first without the fm options) and sudo dpkg --remove libreoffice-base
and this is the result, I am still left with a broken package
When I look into /var/lib/dpkg/info/libreoffice-base.postrm: Syntax error: end of file unexpected (expecting "fi")
there does not seem to be a missing fi or should I be looking in some other script ?
So how can I get rid of this and install LO from the normal repo again ?
I suppose removing via root all LO related directories will not help because apt will still have something left over and will not know what to do with it.
In another thread, I saw someone sugesting reinstalling Kubuntu altogether to solve a similar LO broken package problem, but that seems overkill to me.
Besides this may be a good opportunity to learn more about solving deb packaging errors, so if possible I'd prefer to understand what is the problem
and how to solve it instead of just avoiding it by reinstalling the complete OS.
I saw that it is now available in the normal repository, so I uninstalled the ppa version and want to install it from the normal repo.
While uninstalling, an error came up and I was left with a broken package, libreoffice-base, and I don't seem to be able to get rid of it
I tried sudo apt-get -fm remove libreoffice-base (first without the fm options) and sudo dpkg --remove libreoffice-base
and this is the result, I am still left with a broken package
Code:
Removing libreoffice-base (1:4.3.0-0ubuntu1~trusty1) ... No diversion 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base', none removed. No diversion 'diversion of /usr/lib/libreoffice/share/basic/script.xlc to /usr/lib/libreoffice/share/basic/script.xlc.noaccess by libreoffice-base', none removed. /var/lib/dpkg/info/libreoffice-base.postrm: 28: /var/lib/dpkg/info/libreoffice-base.postrm: Syntax error: end of file unexpected (expecting "fi") 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)
there does not seem to be a missing fi or should I be looking in some other script ?
Code:
#!/bin/sh set -e if [ "$1" = remove -o "$1" = abort-install -o "$1" = disappear ]; then dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \ --divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \ /usr/lib/libreoffice/share/basic/dialog.xlc dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \ --divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \ /usr/lib/libreoffice/share/basic/script.xlc fi if [ "$1" = abort-upgrade ] && dpkg --compare-versions "$2" lt dpkg --compare-versions "$2" lt 1:4.3.0~beta1-1; then dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \ --divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \ /usr/lib/libreoffice/share/basic/dialog.xlc dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \ --divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \ fi # Automatically added by dh_installmenu if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section exit 0
I suppose removing via root all LO related directories will not help because apt will still have something left over and will not know what to do with it.
In another thread, I saw someone sugesting reinstalling Kubuntu altogether to solve a similar LO broken package problem, but that seems overkill to me.
Besides this may be a good opportunity to learn more about solving deb packaging errors, so if possible I'd prefer to understand what is the problem
and how to solve it instead of just avoiding it by reinstalling the complete OS.
Comment