在R中安装devtools包

时间:2014-07-28 11:22:43

标签: r devtools

尝试在R中安装devtools包我遇到了麻烦

> install.packages("devtools",dependencies=TRUE)
Installing package into ‘/home/evandar/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘BiocInstaller’ is not available
also installing the dependencies ‘httr’, ‘RCurl’

trying URL 'http://cran.rstudio.com/src/contrib/httr_0.3.tar.gz'
Content type 'application/x-gzip' length 196942 bytes (192 Kb)
opened URL
==================================================
downloaded 192 Kb

trying URL 'http://cran.rstudio.com/src/contrib/RCurl_1.95-4.1.tar.gz'
Content type 'application/x-gzip' length 870915 bytes (850 Kb)
opened URL
==================================================
downloaded 850 Kb

trying URL 'http://cran.rstudio.com/src/contrib/devtools_1.5.tar.gz'
Content type 'application/x-gzip' length 112272 bytes (109 Kb)
opened URL
==================================================
downloaded 109 Kb

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/evandar/R/x86_64-pc-linux-gnu-library/3.1/RCurl’
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status
ERROR: dependency ‘RCurl’ is not available for package ‘httr’
* removing ‘/home/evandar/R/x86_64-pc-linux-gnu-library/3.1/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘RCurl’ are not available for package ‘devtools’
* removing ‘/home/evandar/R/x86_64-pc-linux-gnu-library/3.1/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpbsrCjU/downloaded_packages’

我在这里发现了这篇文章

Problems installing the devtools package

并安装了curl但是这还没有解决我的问题,因为install.packages直到不能使用上面显示的消息的错误消息。有人可能会建议我如何规避这个问题或者我做错了什么?我在R 3.1.1和Ubuntu 14.04上运行。

如果我从评论中输入curl-config

The program 'curl-config' can be found in the following packages:
 * libcurl4-gnutls-dev
 * libcurl4-nss-dev
 * libcurl4-openssl-dev
Try: sudo apt-get install <selected package>

这可能意味着问题与副本中的问题不同。我用

安装了curl
apt-get -y build-dep libcurl4-gnutls-dev
apt-get -y install libcurl4-gnutls-dev

0 个答案:

没有答案