我错误地在 Ubuntu 16.04 上通过运行以下命令对 libfontconfig1 进行了 dpkg 处理:
sudo dpkg -i ~/Downloads/libfontconfig1_2.12.3-0.2_amd64.deb
现在它与之前安装的 libfontconfig1 冲突。以下是列表:
$sudo dpkg --list libfontconfig1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-==================-============-============================================
rU libfontconfig1:amd64 2.12.3-0.2 amd64 generic font configuration library - runtime
iF libfontconfig1:i386 2.11.94-0ubuntu1.1 i386 generic font configuration library - runtime
我无法删除它,因为它似乎是一个主要包并且依赖于许多其他包:它们都需要一个版本(低于 2.12.3-0.2)或更大版本。似乎因为或更大情况是,版本 2.12.3-0.2 被阻止删除,尽管我安装了其他版本。当我运行
sudo apt-get purge libfontconfig1:amd64
它不允许我这样做,因为很多事情取决于包的较低或相同版本:
firefox : Depends: libfontconfig1 (>= 2.11.94) but it is not going to be installed
libbluray1 : Depends: libfontconfig1 (>= 2.9.0) but it is not going to be installed
libcairo2 : Depends: libfontconfig1 (>= 2.9.0) but it is not going to be installed
...
通过 dpkg 删除也无济于事:
$sudo dpkg --remove libfontconfig1:amd64
libqtwebkit4:amd64 depends on libfontconfig1 (>= 2.9.0).
openjdk-8-jre-headless:amd64 depends on libfontconfig1.
libclutter-1.0-0:amd64 depends on libfontconfig1 (>= 2.9.0).
fontconfig depends on libfontconfig1 (>= 2.11.94).
...
dpkg: error processing package libfontconfig1:amd64 (--remove):
dependency problems - not removing
Errors were encountered while processing:
libfontconfig1:amd64
当我跑步时sudo apt-get -f 安装我得到以下结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libfontconfig1: Depends: fontconfig-config (>= 2.12.3-0.2) but 2.11.94-0ubuntu1.1 is installed
Breaks: libfontconfig1:i386 (!= 2.12.3-0.2) but 2.11.94-0ubuntu1.1 is installed
libfontconfig1:i386 : Breaks: libfontconfig1 (!= 2.11.94-0ubuntu1.1) but 2.12.3-0.2 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
那么,如何删除 libfontconfig1 包的特定版本?
感谢任何帮助。