Score:0

Unable to install libfreetype6-dev on Ubuntu 20.04 LTS

cn flag

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.

guiverc avatar
cn flag
The package is available `libfreetype6-dev | 2.10.1-2ubuntu0.1 | focal-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x` so `sudo apt update` & read the messages to ensure you don't have errors/warnings or missing lines in that output...
Ceres avatar
cn flag
Turns out I had to force install the correct dependencies instead of force installing the package itself. It works now
Score:-1
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.