【问题标题】:Unavailable to install Systemfonts packages in Bioconductor 3.12 (R 4.0.1)无法在 Bioconductor 3.12 (R 4.0.1) 中安装 Systemfonts 包
【发布时间】:2020-06-14 11:58:33
【问题描述】:

我最近将 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。

有人知道我该怎么办吗?

【问题讨论】:

  • 您是如何尝试安装 freetype2 的?这不是 R 包,但必须通过例如安装Homebrew 在 macOS 上。也就是说,如果您指定您使用的操作系统,它也会有所帮助。

标签: r bioconductor


【解决方案1】:

如果您使用的是 macOS,请从终端使用 Homebrew 安装 freetype:

brew install freetype

然后重新启动 R 并尝试再次从源安装 systemfonts

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

【讨论】:

  • 我设法在您回答之前解决了问题。在安装包的过程中,我被问到是否要下载需要编译的包的源,在我选择no而不是yes后,安装顺利。我不知道为什么。不过还是谢谢你的回答。
  • @pill45 是的,这也可能有效,但通常当您不从源代码安装时,您没有使用最新的稳定版本的软件包,这可能会在以后导致其他问题。但是,如果它对你有用,那就坚持下去吧:)
【解决方案2】:

我设法在@milanmft 回答之前解决了问题。在安装包的过程中,有人问我

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

在我最初选择no而不是yes之后,安装很顺利。我认为这可能是解决问题的一种方法,尽管我不知道确切的原因。不过谢谢@milanmft 的回答和帮助。

【讨论】:

    猜你喜欢
    • 2016-01-18
    • 2021-07-08
    • 2020-09-08
    • 2017-02-01
    • 2020-03-06
    • 2017-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多