尝试在 Ubuntu 13.10 64 位上安装 openoffice。安装顺利进行,但应用程序未显示在我的 GUI 应用程序窗口中。这是因为桌面集成吗?当我尝试安装桌面集成器时,我得到了这个...
jacob@jacob-desktop:~/mydebs/en-US/DEBS/desktop-integration$ sudo dpkg -i *.deb(Reading database ... 172964 files and directories currently installed.)
Unpacking openoffice-debian-menus (from openoffice4.0-debian-menus_4.0-9714_all.deb) ...
dpkg: error processing openoffice4.0-debian-menus_4.0-9714_all.deb (--install):
trying to overwrite '/usr/bin/soffice', which is also in package libreoffice-common 1:4.1.2~rc3-0ubuntu1
/usr/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
/usr/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
Processing triggers for gnome-icon-theme ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support ...
Errors were encountered while processing:
openoffice4.0-debian-menus_4.0-9714_all.deb
答案1
安装过程并非一帆风顺:
Errors were encountered while processing:
openoffice4.0-debian-menus_4.0-9714_all.deb
这意味着处理包时出错,因此读回:
dpkg: error processing openoffice4.0-debian-menus_4.0-9714_all.deb (--install):
trying to overwrite '/usr/bin/soffice', which is also in package libreoffice-common 1:4.1.2~rc3-0ubuntu1
这意味着您正在尝试在已安装 LibreOffice 的同时安装 OpenOffice.org。您可以删除 LibreOffice 并继续安装 OpenOffice.org,也可以忘记 OpenOffice.org(或者去force-overwrite
)。
要执行第一步,您必须运行:
sudo apt-get -f remove libreoffice-common
然后安装 OpenOffice.org。
强制覆盖
一种方法是告诉 dpkg 强制覆盖现有文件。此命令可能有风险,因为在某些情况下,您可能最终会覆盖必要的文件。因此使用时请自行承担风险。
要启用强制覆盖模式,请将-o Dpkg::Options::="--force-overwrite"
参数传递给 apt-get
。
sudo apt-get -o Dpkg::Options::="--force-overwrite" install <package-name>
如果您尝试使用dpkg
pass --force-overwrite
todpkg
命令安装文件。
sudo dpkg -i --force-overwrite <some_file.deb>
答案2
为了犯这个错误消失这是我做的:
按照 OpenOffice 说明操作这里,特别是删除 LibreOffice 指向“假”
soffice
可执行文件的符号链接当需要安装
desktop-integration
软件包时,强制安装:sudo dpkg --force-all -i *.deb
。我知道这通常是不鼓励的……
这当然会覆盖我们遇到的错误,但是无论如何我已经手动删除了符号链接。