请注意,这些链接的答案无法解决我的问题:
单击错误我收到以下消息:
发生错误,请从右键菜单运行包管理器或在终端中运行 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
答案1
由于您的存储库是正确的,我们可以简单地强制安装该包:
sudo dpkg -i --force-all /var/cache/apt/archives/libfreetype6_2.8.1-2ubuntu2_i386.deb
然后使用以下命令恢复安装:
sudo apt-get install -f
sudo dpkg --configure -a
并确保获取所有新的依赖项:
sudo apt-get update
sudo apt-get dist-upgrade