5

I have the LibreOffice ppa installed (ppa:libreoffice/ppa) and today I had a problem after updating. I got the following error.

Reading package lists ... Done
Building dependency tree
Reading state information ... Ready
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libreoffice-base: Depends: libreoffice-base-core (= 1: 4.3.0-0ubuntu1 ~ precise1) but 4.3.0-3ubuntu1 ~ precise1 is installed
                    Depends: libreoffice-base-drivers (= 1: 4.3.0-0ubuntu1 ~ precise1) but 4.3.0-3ubuntu1 ~ precise1 is installed
                    Depends: libreoffice-core (= 1: 4.3.0-0ubuntu1 ~ precise1) but 4.3.0-3ubuntu1 ~ precise1 is installed
  libreoffice-core: Breaks: libreoffice-base (<1: ~ 4.3.0-3ubuntu1 precise1) but 4.3.0-0ubuntu1 ~ precise1 is installed
E: Unmet dependencies. Try to use -f.

After trying

sudo apt-get install -f

I got the following output

Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd       
De status informatie wordt gelezen... Klaar
Vereisten worden gecorrigeerd... Klaar
De volgende extra pakketten zullen geïnstalleerd worden:
  libreoffice-base
Voorgestelde pakketten:
  libreoffice-gcj libreoffice-report-builder unixodbc
De volgende pakketten zullen opgewaardeerd worden:
  libreoffice-base
1 pakketten opgewaardeerd, 0 pakketten nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.
3 pakketten niet volledig geïnstalleerd of verwijderd.
Er moeten 0 B/2170 kB aan archieven opgehaald worden.
Door deze operatie zal er 2841 kB extra schijfruimte gebruikt worden.
Wilt u doorgaan [J/n]? 
dpkg: vereistenproblemen verhinderen de configuratie van libreoffice-base:
 libreoffice-base is afhankelijk van libreoffice-base-core (= 1:4.3.0-0ubuntu1~precise1); maar:
  Versie van libreoffice-base-core op dit systeem is 1:4.3.0-3ubuntu1~precise1.
 libreoffice-base is afhankelijk van libreoffice-base-drivers (= 1:4.3.0-0ubuntu1~precise1); maar:
  Versie van libreoffice-base-drivers op dit systeem is 1:4.3.0-3ubuntu1~precise1.
 libreoffice-base is afhankelijk van libreoffice-core (= 1:4.3.0-0ubuntu1~precise1); maar:
  Versie van libreoffice-core op dit systeem is 1:4.3.0-3ubuntu1~precise1.
 libreoffice-core (1:4.3.0-3ubuntu1~precise1) breaks libreoffice-base (<< 1:4.3.0-3ubuntu1~precise1) and is geïnstalleerd.
  Version of libreoffice-base to be configured is 1:4.3.0-0ubuntu1~precise1.
dpkg: fout bij afhandelen van libreoffice-base (--configure):
 vereistenproblemen - blijft ongeconfigureerd
dpkg: vereistenproblemen verhinderen de configuratie van libreoffice-report-builder-bin:
 libreoffice-report-builder-bin is afhankelijk van libreoffice-base; maar:Er is geen apport-verslag weggeschreven omdat de foutmelding volgt op een eerdere mislukking.

  Pakket libreoffice-base is nog niet geconfigureerd.
dpkg: fout bij afhandelen van libreoffice-report-builder-bin (--configure):
 vereistenproblemen - blijft ongeconfigureerd
dpkg: vereistenproblemen verhinderen de configuratie van libreoffice:
 libreoffice is afhankelijk van libreoffice-base; maar:
  Pakket libreoffice-base is nog niet geconfigureerd.
 libreoffice is afhankelijk van libreoffice-report-builder-bin; maar:
  Pakket libreoffice-report-builder-bin is nog niet geconfigureerd.
dpkg: fout bij afhandelen van libreoffice (--configure):
 vereistenproblemen - blijft ongeconfigureerd
Er is geen apport-verslag weggeschreven omdat de foutmelding volgt op een eerdere mislukking.
              Er is geen apport-verslag weggeschreven omdat de foutmelding volgt op een eerdere mislukking.
                            Fouten gevonden tijdens behandelen van:
 libreoffice-base
 libreoffice-report-builder-bin
 libreoffice
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I solve this problem so the dependencies are solved? Do I have to configure libreoffice-base manually?

10

I followed a thread on Ubuntu forums to solve this problem. There seems to be a line missing from this maintenance script file:

/var/lib/dpkg/info/libreoffice-base.postrm

The missing line,

/usr/lib/libreoffice/share/basic/script.xlc

needs to be added to the end of the file's second if statement, just above the closing fi, like so:

--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
/usr/lib/libreoffice/share/basic/script.xlc
fi

After adding the line, using (for example):

sudo nano /var/lib/dpkg/info/libreoffice-base.postrm

restart your computer and remove libreoffice-base with the following command:

sudo apt-get purge libreoffice-base libreoffice-report-builder-bin libreoffice

Once this process completes, restart and execute the following to reinstall libreoffice:

sudo apt-get install libreoffice-base libreoffice

Once libreoffice had been successfully reinstalled, I ran:

sudo apt-get update
sudo apt-get upgrade

without error.

This handful of steps and with additional reference to a bug report solved my problem.

  • I followed your instruction and changed the file, but after I rebooted and tried to remove libreoffice-base I got the following error message: [pastebin.com/Zr14Nv5g] – Wicky Aug 17 '14 at 21:03
  • @Wicky! I would like to advise, but it seems the content of your pastebin link was removed soon after you posted your comment! I hope you were able to find a solution. – maclenin Aug 18 '14 at 6:47
  • I'm sorry I don't know why that happened, this one should be correct: pastebin.com/3NxK2GaY – Wicky Aug 18 '14 at 14:01
  • 1
    @Wicky! Yes - the latest pastebin was readable (though in Dutch, it seems?). You might want to try using aptitude in place of apt-get to both remove libreoffice-base and install the libreoffice-base and libreoffice packages. For example, run: sudo aptitude remove libreoffice-base, restart and then sudo aptitude install libreoffice-base - restart again, and then sudo aptitude install libreoffice Good luck. – maclenin Aug 18 '14 at 19:02
  • The apt-get remove... didn't work for me - I needed to use the purge version as noted in this bug-report comment. All quite annoying, but good to have such active help from the wider community. – Dɑvïd Aug 19 '14 at 7:14
0

1) sudo nano /var/lib/dpkg/info/libreoffice-base.postrm

Add the line:

/usr/lib/libreoffice/share/basic/script.xlc

to the end of the file's second if statement, just above the closing fi. The new code must be:

--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
/usr/lib/libreoffice/share/basic/script.xlc
fi

2) Issue the following commands:

  sudo mv /var/lib/dpkg/info/libreoffice.* /tmp/
  sudo dpkg --remove --force-remove-reinstreq libreoffice 
  sudo dpkg --remove --force-remove-reinstreq libreoffice-base
  sudo apt-get autoclean
  sudo apt-get autoremove
  sudo apt-get update
  sudo apt-get install libreoffice

Solution based on:

https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1354557 http://www.piprime.fr/1480/manually-remove-broken-package-debian-ubuntu/

protected by Community Aug 17 '14 at 8:15

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.