0

I am trying to install libfreetype6-dev.

Running sudo apt-get install libfreetype6-dev gives

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.

I tried forcing the version, as mentioned here, and added fix-broken and f flags, but it still fails to install.

Ceres
  • 109

1 Answers1

0

As the error says, libfreetype-dev needs to be installed as a dependency, trying to install it raised the error

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.

So I had to force install libfreetype6=2.10.1-2ubuntu0.1 with
sudo apt get-install libfreetype6=2.10.1-2ubuntu0.1,
after that I could install libfreetype-dev, and then libfreetype6-dev with
sudo apt-get install libfreetype-dev
sudo apt-get install libfreetype6-dev.

Ceres
  • 109