简体   繁体   中英

Error when installing “devtools” package for R in Ubuntu

Could someone help me to find out a solution to this error?

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

print(sessionInfo(), locale=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’

The pertinent lines:

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

You need to install libcurl for RCurl (which devtools depends on).

From http://www.omegahat.org/RCurl/FAQ.html , assuming you're on a Linux flavour using apt-get :

sudo apt-get install libcurl4-gnutls-dev

should get you the libraries you need for RCurl .

check your R version. Try to update this. This problem will be solved. I spent one day and go through all the solution. No solution work. Try this solution .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM