Ubuntu – libreoffice-base not configured yet

12.04configurationlibreofficeppa

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?

Best Answer

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.

Related Question