简体   繁体   中英

Having difficulty installing R package in specific directory

I am not sure what I am doing wrong. This seems very strange to me. I am trying to install packages on an AWS server running Concerto with the following command. concerto$mediaPath is a list item that targets a writable directory.

lib=paste0(concerto$mediaPath,"/lib")
dir.create(lib)
install.packages("RCurl", lib=lib, repos='http://cran.us.r-project.org')
library("RCurl", lib=lib)

After running the command it seems to install RCurl without error but the library command produces an error that says "RCurl" cannot be found. If I do:

dir(lib)

It says that "bitops" is in the created folder but not "RCurl". I believe RCurl has a dependency on bitops which explains why it was installed but not why RCurl did not install.

Any ideas would be very helpful. Thanks!

If you are sure you can create that directory AND that you can see it on .libPaths() ... Then you also need to make sure that your system is configured to meet this requirement in the DESCRIPTION file:

SystemRequirements: libcurl (version 7.14.0 or higher)
    http://curl.haxx.se. On Linux systems, you will often have to
    explicitly install libcurl-devel to have the header files and
    the libcurl library.

First version erroneously left off the "." from .libPaths()

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