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*