在Ubuntu中安装R语言的"devtools"包时出现错误

4

有人能帮我找出解决这个错误的方法吗?

install.packages("devtools")

该命令用于安装名为“devtools”的 R 语言软件包。

  > * 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/juanchi/R/x86_64-pc-linux-gnu-library/3.0/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/juanchi/R/x86_64-pc-linux-gnu-library/3.0/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/juanchi/R/x86_64-pc-linux-gnu-library/3.0/devtools’ Warning in install.packages :   installation of package ‘devtools’ had
    > non-zero exit status
    > 
    > The downloaded source packages are in

打印出sessionInfo()的结果,不包含区域设置:

R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit)

attached base packages: [1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached): [1] tools_3.0.2
    >   ‘/tmp/RtmpDMZcfn/downloaded_packages’
2个回答

12

相关的行:

> ** package ‘RCurl’ successfully unpacked and MD5 sums checked checking for curl-config... no Cannot find curl-config ERROR: configuration
    > failed for package ‘RCurl’

你需要为 RCurl 安装 libcurldevtools 依赖于此)。

http://www.omegahat.org/RCurl/FAQ.html获得信息,假设你使用 apt-get 在 Linux 平台上:

sudo apt-get install libcurl4-gnutls-dev

你应该能够获取你需要的库来使用RCurl


0

检查你的R版本。尝试更新它。这个问题将会被解决。我花了一天时间并尝试了所有的解决方案,但没有一个解决方案有效。试试这个解决方案


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接