apt-get 数据库问题 lubuntu 16.04 ....

apt-get 数据库问题 lubuntu 16.04 ....

我的 apt-get 数据库完全混乱了,运行上面建议的修复程序时出现了以下问题:

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libreoffice-common
Suggested packages:
  libreoffice-style-breeze 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 0 not upgraded.
21 not fully installed or removed.
Need to get 0 B/22.3 MB of archives.
After this operation, 84.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package libreoffice-common.
(Reading database ... 333538 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb ...
Unpacking libreoffice-common (1:5.1.4-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package     openoffice-debian-menus 4.1.2-9782
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 bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for gnome-icon-theme (3.12.0-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
$

我无法通过命令行和 synaptic 中的各种建议(谷歌发现)来清除此问题。有什么方法可以纠正此问题吗?

答案1

这两个包libreoffice-commonopenoffice-debian-menus包含该文件/usr/bin/soffice,因此一次只能安装其中一个。

目前你已经openoffice-debian-menus安装了,但由于它不是官方的 Ubuntu 软件包,我建议使用以下方法删除它

sudo apt-get remove openoffice-debian-menus

相关内容