请注意,这些链接的答案无法解决我的问题:
单击错误我收到此消息:
发生错误,请从右键菜单中运行包管理器或在终端中 apt-get 以查看问题所在。错误消息是:'Error:BrokenCount>0'。这通常意味着您安装的软件包具有解除依赖关系
跑步时sudo apt --fix-broken install
我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libfreetype6:i386
The following NEW packages will be installed:
libfreetype6:i386
0 upgraded, 1 newly installed, 0 to remove and 67 not upgraded.
7 not fully installed or removed.
Need to get 0 B/351 kB of archives.
After this operation, 972 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 222665 files and directories currently installed.)
Preparing to unpack .../libfreetype6_2.8.1-2ubuntu2_i386.deb ...
Unpacking libfreetype6:i386 (2.8.1-2ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/libfreetype6_2.8.1-2ubuntu2_i386.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libfreetype6/FTL.TXT.gz', which is different from other instances of package libfreetype6:i386
Errors were encountered while processing:
/var/cache/apt/archives/libfreetype6_2.8.1-2ubuntu2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我知道问题是上述输出中的这一行:
试图覆盖共享的 '/usr/share/doc/libfreetype6/FTL.TXT.gz',这与包 libfreetype6:i386 的其他实例不同
我该怎么做才能停止尝试覆盖它?请注意,我libfreetype6:i386
在尝试添加wine
. 我不需要它并想删除它。但似乎其他软件包都依赖于它。运行sudo apt-get autoremove
我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libcairo2:i386 : Depends: libfreetype6:i386 (>= 2.7.1) but it is not installed
libfontconfig1:i386 : Depends: libfreetype6:i386 (>= 2.2.1) but it is not installed
libgd3:i386 : Depends: libfreetype6:i386 (>= 2.2.1) but it is not installed
libwine:i386 : Depends: libfreetype6:i386 (>= 2.2.1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
这就像陷入了僵局。这个依赖问题不允许我在我的系统上安装甚至升级任何其他应用程序。请帮忙!
编辑:
按照评论中的建议尝试apt-cache policy libfreetype6 libfreetype6:i386 libfreetype6:
给出:
Installed: 2.8.1-2ubuntu2
Candidate: 2.8.1-2ubuntu2
Version table:
*** 2.8.1-2ubuntu2 500
500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status
libfreetype6:i386:
Installed: (none)
Candidate: 2.8.1-2ubuntu2
Version table:
2.8.1-2ubuntu2 500
500 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages
由于您的存储库是正确的,我们可以简单地强制安装软件包:
然后使用以下命令恢复安装:
并且肯定会通过以下方式获得所有新的依赖项: