我正在尝试安装libfreetype6-dev。
跑步sudo apt-get install libfreetype6-dev
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libfreetype6-dev : Depends: libfreetype-dev (= 2.10.1-2ubuntu0.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试强制使用这个版本,正如这里提到的,并添加了fix-broken
和f
标志,但仍然无法安装。
答案1
正如错误所说,libfreetype-dev
需要作为依赖项安装,尝试安装它会引发错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libfreetype-dev : Depends: libfreetype6 (= 2.10.1-2ubuntu0.1) but 2.10.1-2ubuntu0.20.04ppa1 is to be installed
E: Unable to correct problems, you have held broken packages.
所以我不得不强制安装libfreetype6=2.10.1-2ubuntu0.1
,
sudo apt get-install libfreetype6=2.10.1-2ubuntu0.1
之后
我才能安装libfreetype-dev
,然后libfreetype6-dev
使用
sudo apt-get install libfreetype-dev
sudo apt-get install libfreetype6-dev
。