我尝试通过软件中心安装 LibreOffice,但出现错误,安装失败。现在它在软件中心显示为“已安装”,但实际上并未安装。我意识到这是因为我安装了 OpenOffice4.1.1。我尝试删除 OpenOffice,但到目前为止,我在任何互联网论坛上找到的命令都不起作用。
软件中心现在陷入了修复和无法修复 OpenOffice 导致的问题的循环中。现在我的笔记本电脑既不能更新也不能安装其他软件。我手动删除了终端中的所有 LibreOffice 文件,希望它能停止这个过程,但当然没有。有人能告诉我现在如何停止 LibreOffice 的安装过程吗?提前谢谢。
以下是软件中心尝试修复该问题时出现的错误:
installArchives() failed:
Preparing to unpack .../libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb ...
Unpacking libreoffice-common (1:4.2.8-0ubuntu2) ...
dpkg:
error processing archive /var/cache/apt/archives/libreoffice-common_1%3a4.2.8-0ubuntu2_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 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 shared-mime-info (1.2-0ubuntu3) ...
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 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.2.8-0ubuntu2_all.deb
Error in function:
dpkg: dependency problems prevent configuration of libreoffice-l10n-en-gb: libreoffice-l10n-en-gb depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-en-gb (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-java-common: libreoffice-java-common depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-java-common (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-l10n-en-za: libreoffice-l10n-en-za depends on libreoffice-common; however: Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-en-za (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-help-en-gb:
libreoffice-help-en-gb depends on libreoffice-l10n-en-gb; however:
Package libreoffice-l10n-en-gb is not configured yet.
dpkg: error processing package libreoffice-help-en-gb (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-sdbc-hsqldb:
libreoffice-sdbc-hsqldb depends on libreoffice-java-common (>= 1:4.2.8~); however:
Package libreoffice-java-common is not configured yet.
dpkg: error processing package libreoffice-sdbc-hsqldb (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-l10n-ja:
libreoffice-l10n-ja depends on libreoffice-common; however:
Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-l10n-ja (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-help-en-us:
libreoffice-help-en-us depends on libreoffice-l10n-en-us; however:
Package libreoffice-l10n-en-us is not installed.
dpkg: error processing package libreoffice-help-en-us (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libreoffice-core:
libreoffice-core depends on libreoffice-common (>> 1:4.2.8); however:
Package libreoffice-common is not installed.
dpkg: error processing package libreoffice-core (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-uno:
python3-uno depends on libreoffice-core (= 1:4.2.8-0ubuntu2); however:
答案1
这就是问题:
尝试覆盖 '/usr/bin/soffice',它也位于软件包 openoffice-debian-menus 4.1.1-9775 中
因此打开终端并openoffice-debian-menus
使用命令删除该包
sudo apt-get purge openoffice-debian-menus
之后修复您的安装:
sudo apt-get install -f
答案2
只需运行此命令:
sudo apt-get remove --purge libreoffice-core libreoffice-common python3-uno libreoffice-*
由于 libreoffice 和 openoffice 使用相同的 soffice,因此出现错误。
答案3
这对我有用:
sudo apt-get remove --purge libreoffice-core libreoffice-common unoconv python3-uno libreoffice-*
看来 unoconv 破坏了某些东西并阻止删除依赖于 libreoffice 的软件包。