为 linux 安装 biomaRt 包(R 版本 3.5.2)(Ubuntu 为 Windows)

Install biomaRt package (R version 3.5.2) for linux (Ubuntu for Windows)

我正在尝试安装 Biomart 软件包,我使用了以下代码:

source("https://bioconductor.org/biocLite.R")
    biocLite("biomaRt")
    library("biomaRt")

我收到这条警告消息:

Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘openssl’ had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘XML’ had non-zero exit status
4: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘RCurl’ had non-zero exit status
5: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘httr’ had non-zero exit status
6: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘biomaRt’ had non-zero exit status

有人帮忙吗? 谢谢。

这里的问题是R需要编译其他R包:curlopensslXMLRCurl。为此,需要在您的 Linux 平台上安装一些 开发库

您通常可以猜到它们可能叫什么:如果 R 包 "XXX" 有问题,您需要 apt-cache search 来解决 libXXX-dev 之类的问题。通常名称也包括一个数字。所以你可以尝试,例如,从命令行:

sudo apt-get update
apt-cache search libcurl | grep dev

搜索 libcurl 个开发包。

然后就可以安装了,例如:

sudo apt-get install libcurl4-openssl-dev

我认为您至少需要这样的东西:

sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev

然后再尝试安装R包。记下任何错误消息,根据需要安装更多库,重复直到它起作用。

使用适当的术语进行网络搜索应该可以找到有关安装所需系统依赖项的更多信息。