2014-10-18 76 views
4

有人可以幫我找出解決這個錯誤的方法嗎?在Ubuntu中爲R安裝「devtools」包時出錯

install.packages(註明 「DevTools」)

> * 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(),語言環境= FALSE)

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’ 

回答

12

中的相關行:

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

您需要安裝libcurlRCurl(其中devtools取決於)。

http://www.omegahat.org/RCurl/FAQ.html,假設你使用apt-get Linux的味道:

sudo apt-get install libcurl4-gnutls-dev 

應該得到你需要的RCurl庫。

+0

它工作正常! – Juanchi 2014-10-19 12:32:26

+0

另請參閱(相同的答案)http://stackoverflow.com/a/20695549/127971 – michael 2016-06-17 08:09:48

0

檢查您的R版本。嘗試更新此。這個問題將被解決。我花了一天的時間,完成了所有的解決方案。沒有解決方案。 Try this solution