在 Libreoffice 卸载失败后,我遇到了一些损坏的软件包(我安装了 Apache Openoffice,但似乎我没有先完全删除 LO)。以下是我对各种命令得到的一些响应。
先问最简单的问题...在继续之前我应该删除 Apache OO 吗?
这里的第一组仅显示已安装的内容,我认为显示了所有损坏的 LO 包:
$ aptitude search '~i' | grep libreoffice
B libreoffice-emailmerge - transitional package for LibreOffices emai
B libreoffice-java-common - office productivity suite -- arch-independ
i libreoffice-style-tango - office productivity suite -- Tango symbol
i openclipart-libreoffice - clip art for OpenOffice.org/LibreOffice ga
无法删除损坏的软件包或者已安装的软件包:
$ sudo apt-get purge libreoffice-emailmerge
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libreoffice-java-common : Depends: libreoffice-common but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$
$ sudo apt-get purge openclipart-libreoffice
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libreoffice-emailmerge : Depends: libreoffice-common (>= 1:4.0.2~rc1) but it is not going to be installed
libreoffice-java-common : Depends: libreoffice-common but it is not going to be installed
openclipart : Depends: openclipart-libreoffice (= 2.0-1ubuntu1) but it is not going to be installed
openclipart-openoffice.org : Depends: openclipart-libreoffice but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我尝试修复损坏的软件包:
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libclucene-contribs1 libclucene-core1 libcmis-0.3-3 libexttextcat-2.0-0 libexttextcat-data liblangtag-common liblangtag1
libreoffice-common libreoffice-core python-uno uno-libs3 ure
Suggested packages:
libreoffice-style-crystal libreoffice-style-hicontrast libreoffice-style-human libreoffice-style-oxygen
The following packages will be REMOVED:
libexttextcat0
The following NEW packages will be installed:
libclucene-contribs1 libclucene-core1 libcmis-0.3-3 libexttextcat-2.0-0 liblangtag-common liblangtag1 libreoffice-common
libreoffice-core python-uno
The following packages will be upgraded:
libexttextcat-data uno-libs3 ure
3 upgraded, 9 newly installed, 1 to remove and 6 not upgraded.
4 not fully installed or removed.
Need to get 61.5 MB of archives.
After this operation, 209 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main ure amd64 4.1.0-0ubuntu1~precise1~ppa1 [1,910 kB]
Get:2 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main uno-libs3 amd64 4.1.0-0ubuntu1~precise1~ppa1 [773 kB]
Get:3 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libreoffice-common all 1:4.1.0-0ubuntu1~precise1~ppa1 [27.5 MB]
Get:4 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libclucene-core1 amd64 2.3.3.4-2~precise1 [602 kB]
Get:5 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libclucene-contribs1 amd64 2.3.3.4-2~precise1 [114 kB]
Get:6 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libcmis-0.3-3 amd64 0.3.1-1ubuntu1~precise1 [318 kB]
Get:7 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libexttextcat-data all 3.4.0-1~precise1 [193 kB]
Get:8 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libexttextcat-2.0-0 amd64 3.4.0-1~precise1 [17.0 kB]
Get:9 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main liblangtag-common all 0.5.1-2~precise2 [135 kB]
Get:10 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main liblangtag1 amd64 0.5.1-2~precise2 [55.4 kB]
Get:11 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libreoffice-core amd64 1:4.1.0-0ubuntu1~precise1~ppa1 [29.5 MB]
Get:12 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main python-uno amd64 1:4.1.0-0ubuntu1~precise1~ppa1 [283 kB]
Fetched 61.5 MB in 29s (2,104 kB/s)
(Reading database ... 1099753 files and directories currently installed.)
Preparing to replace ure 3.5.7-0ubuntu4 (using .../ure_4.1.0-0ubuntu1~precise1~ppa1_amd64.deb) ...
Unpacking replacement ure ...
Preparing to replace uno-libs3 3.5.7-0ubuntu4 (using .../uno-libs3_4.1.0-0ubuntu1~precise1~ppa1_amd64.deb) ...
Unpacking replacement uno-libs3 ...
Unpacking libreoffice-common (from .../libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.0-9702
rmdir: failed to remove `/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice/share/': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Processing triggers for hicolor-icon-theme ...
Processing triggers for gnome-icon-theme ...
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我有 LO ppa:ppa.launchpad.net/libreoffice/ppa/ubuntu
我应该删除它吗?
我接下来可以尝试什么?有暴力破解选项吗?比如 libreoffice 目录的 rm -f?
答案1
您应该决定一个您真正需要的包。
您可以尝试使用图形化 Ubuntu 包管理器(带有 GUI 的 synaptic)来解决这个问题!:
使用密码登录后,首先设置一个钩子,删除(完全删除)所有 OpenOffice 和 LibreOffice 软件包。然后在那里“应用”它。
成功删除后 - 关闭图形化 Ubuntu 包管理器(带有 GUI 的 synaptic)。
最好重新启动你的 Ubuntu 机器。
回到终端,您可以尝试重新提取下载的 Apache-Office 包。
gunzip Apache_OpenOffice*.tar.gz
然后
tar -xvf Apache_OpenOffice*.tar
这应该可行。
如果这不起作用,那么 Apache 包可能存在错误。
答案2
我遇到了完全相同的问题,在尝试了所有建议都无济于事后,我创建了一个启动盘并重新安装了 Ubuntu(http://www.ubuntu.com/download/desktop/burn-a-dvd-on-ubuntu)。最棒的是,我没有丢失任何文件,而且据我所知,在我重新安装程序后,我的所有设置都恢复了。所以如果没有更好的解决方案,我会选择这种方法。