“未满足的依赖项”,无法删除 AOO 或 LibreOffice

“未满足的依赖项”,无法删除 AOO 或 LibreOffice

因此,我最近在我的计算机上重新安装了 Ubuntu(14.04,因为 14.10 出现了一些小问题)。

我忘记了上次安装 OpenOffice 和 LibreOffice 时遇到的问题,因此再次尝试在同一台机器上安装它们(我先安装了 OO,然后安装了 LO)。

现在,Ubuntu 甚至无法再更新。它给出了一个问题,我在网上看到过几次这个问题的解决方法,即臭名昭著的“未满足的依赖关系”。事实上,我已经尝试过了-f install,但没有成功,使用、或类似命令删除 openoffice 或 libreofficeremovepurge不起作用,所有这些命令都会导致依赖关系出现同样的问题。

我请求帮助:如何删除这些程序中的任何一个,而无需再次重新安装 Ubuntu?

我附上了我已经尝试过的在网上看到的每个命令的答复:

$ sudo apt-get -f install
The following packages were automatically installed and are no longer required:
  hyphen-it libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-it
  libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-it
  mythes-en-au mythes-en-us mythes-it
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libreoffice-common
Suggested packages:
  libreoffice-style-crystal libreoffice-style-hicontrast
  libreoffice-style-human libreoffice-style-oxygen libreoffice-style-sifr
  libreoffice-style-tango
The following NEW packages will be installed:
  libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded.
23 not fully installed or removed.
Need to get 0 B/20,4 MB of archives.
After this operation, 79,2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Unpacking libreoffice-common (1:4.4.0~rc3-0ubuntu1~trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.4.0~rc3-0ubuntu1~trusty1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.1-9775
rmdir: failed to remove ‘/var/lib/libreoffice/share/prereg/’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice/share/’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice/program/’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice’: No such file or directory
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for gnome-icon-theme (3.10.0-0ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a4.4.0~rc3-0ubuntu1~trusty1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt-get autoremove(甚至在我输入最后一条命令时也建议)

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:4.4.0~rc3) but it is not installed
 libreoffice-help-en-us : Depends: libreoffice-l10n-en-us
 libreoffice-java-common : Depends: libreoffice-common but it is not installed
 libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not installed
 libreoffice-l10n-en-za : Depends: libreoffice-common but it is not installed
 libreoffice-l10n-it : Depends: libreoffice-common but it is not installed
E: Unmet dependencies. Try using -f.

看到这没有帮助我,我甚至再次尝试“安装”Lo,因为问题似乎是由于缺少软件包引起的,但我得到的答案是一样的。尝试自动移除、清除、自动清理等方法也是如此。如果有人需要,我也可以发布这些行。

答案1

在运行之前尝试强制删除未满足依赖关系的软件包apt-get -f install。根据您的具体情况,您可以尝试:

sudo apt-get -f remove libreoffice-core libreoffice-help-en-us libreoffice-java-common libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-it

请务必查看已安装的软件包并将命令添加到任何 OpenOffice.org 相关软件包之上,以防止其他冲突。

在尝试运行 之前,也请尝试运行sudo apt-get autoremove和。希望最后一个命令不会发现任何可执行的操作,这样您就可以使用 进行全新安装。 sudo apt-get checksudo apt-get install -fsudo apt-get install libreoffice

相关内容