ubuntu openoffice解决方法
因为update openoffice,或者误删除了openoffice,导致升级出错:
Java代码
Can't open /usr/share/applications/openoffice4-base.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-calc.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-draw.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-impress.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-javafilter.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-math.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-printeradmin.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-startcenter.desktop: No such file or directory at -e line 1, <> line 3489.
Can't open /usr/share/applications/openoffice4-writer.desktop: No such file or directory at -e line 1, <> line 3489.
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a3.5.7-0ubuntu4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决办法:
Java代码
sudo dpkg --remove --force-remove-reinstreq libreoffice*
sudo apt-get -f dist-upgrade
sudo dpkg --remove --force-remove-reinstreq libssl-dev
sudo dpkg --remove --force-remove-reinstreq python*
sudo apt-get install python2.7
sudo apt-get -f install
sudo apt-get dist-upgrade
sudo apt-get install libreoffice
sudo apt-get upgrade
若你还安装了apache openoffice则先删除之:
Java代码
sudo dpkg --remove --force-remove-reinstreq openoffice*