在Bioconductor 3.12 (R 4.0.1)中无法安装Systemfonts包。

问题描述 投票:0回答:1

我最近将R升级到4.0.1。当我安装一个用于bioconductor的软件包Systemfonts时,安装失败,并提示说是由于没有找到一个软件包。

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

当我尝试安装freetype2时,它显示freetype2不可用于R 4.0.1。

有谁知道我应该怎么做?

r bioconductor
1个回答
1
投票

如果你在macOS上,安装freetype与 自酿,从终端机上安装。

brew install freetype

然后重新启动R并尝试安装 系统字体 再从源头上解决。

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

0
投票

在@milanmlft回答之前,我已经解决了这个问题。在安装一个包的时候,我被问到

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

我选择了 "否",而不是最初的 "是 "之后,安装就顺利了。我想这可能是一个解决问题的方法,虽然我不知道具体原因。但还是要感谢@milanmlft的解答和帮助。

© www.soinside.com 2019 - 2024. All rights reserved.