无法在 Ubuntu 20.04 LTS 上安装 libfreetype6-dev

无法在 Ubuntu 20.04 LTS 上安装 libfreetype6-dev

我正在尝试安装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-brokenf​​标志,但仍然无法安装。

答案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

相关内容