pill45
pill45

Reputation: 621

Unavailable to install Systemfonts packages in Bioconductor 3.12 (R 4.0.1)

I recently upgraded R to 4.0.1. When i install a package for bioconductor, Systemfonts, the installation failed, and an information stated that it is because one package is not found

freetype2 was not found in the pkg-config search path. 
perhaps you should add the directory containing `freetype2.pc' to the pkg_config_path environment 
variable no package 'freetype2' found

when i try to install freetype2, it shows that freetype2 is not available to R 4.0.1.

any one know what should i do?

Upvotes: 1

Views: 3675

Answers (2)

pill45
pill45

Reputation: 621

I manage to solve the problem before @milanmlft answer. During installation of a package, i was ask

do you want to install from sources the package which needs compilation?

After I choose no, instead of yes initially, the installation went smoothly. I think this may be a way to solve the problem although I don't know the exact reason. But thank you @milanmlft answer and help.

Upvotes: 0

milanmlft
milanmlft

Reputation: 441

If you're on macOS, install freetype with Homebrew, from a terminal:

brew install freetype

Then re-start R and try installing systemfonts again from source:

install.packages("systemfonts", type = "source")

Upvotes: 3

Related Questions