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.
Best Answer
Simply use the official PPA :
Option 1 : You don't have
libreoffice
yet :Open a terminal (Ctrl+Alt+T) and run:
Or install using Ubuntu Software center :
Option 2 : You already have an old version of LibreOffice (4.x) :
Open a terminal (Ctrl+Alt+T) and run: