在Linux中安装RCurl作为R的devtools的一部分时出错

时间:2014-07-29 01:05:22

标签: linux r ubuntu libcurl rcurl

前言,我对Linux很新。我在Linux服务器(Ubuntu 12.10,Quantal Quetzal)上安装了R 3.1.1(最新版本),并尝试在R中安装devtools软件包。当我运行install.packages("devtools")命令时,我收到以下内容错误:

Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
...
Warning messages:
1: In install.packages("devtools", dependencies = TRUE) :
  installation of package ‘RCurl’ had non-zero exit status
2: In install.packages("devtools", dependencies = TRUE) :
  installation of package ‘httr’ had non-zero exit status
3: In install.packages("devtools", dependencies = TRUE) :
  installation of package ‘devtools’ had non-zero exit status

我尝试了其他相关StackOverflow答案中的所有命令(见帖子底部),但都没有奏效。例如,如果我输入sudo apt-get install libcurl4-openssl-dev,我会收到以下错误:

Err http://security.ubuntu.com/ubuntu/ quantal-security/main libssl-doc all 1.0.1c-3ubuntu2.5
  404  Not Found [IP: 91.189.92.201 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1c-3ubuntu2.5_amd64.deb  404  Not Found [IP: 91.189.92.201 80]
...
Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我尝试过运行apt-get update,但这也不允许我安装libcurl。

这是我的sources.list文件:

deb http://archive.ubuntu.com/ubuntu quantal main
deb http://archive.ubuntu.com/ubuntu quantal-updates main
deb http://security.ubuntu.com/ubuntu quantal-security main
deb http://archive.ubuntu.com/ubuntu quantal universe
deb http://archive.ubuntu.com/ubuntu quantal-updates universe

deb http://cran.rstudio.com/bin/linux/ubuntu quantal/
deb-src http://cran.rstudio.com/bin/linux/ubuntu quantal/
deb http://cran.rstudio.com/bin/linux/ubuntu raring/
deb-src http://cran.rstudio.com/bin/linux/ubuntu raring/

我尝试更改'存档'到了旧版本'在sources.list中,但它找不到任何libcurl库:libcurl4-openssl-dev,libcurl4-nss-dev或libcurl4-gnutls-dev。

我也尝试过安装Curl 7.37.1 from source,并且安装正确。这样做允许我安装RCurl包但在尝试使用R中的install_github()函数时收到错误:install_github('rCharts', 'ramnathv')

Error in function (type, msg, asError = TRUE) : Protocol https not supported or disabled in libcurl

我不确定这是libcurl,RCurl,devtools还是我的旧Linux发行版的问题。不知道从哪里开始。以下是我咨询过的相关问题:

Problems installing the devtools package

"Non Zero Exit Status" R 3.0.1 'XML' and 'RCurl'

Unable to install Devtools package for R studio mounted on linux redhat server

0 个答案:

没有答案