简体   繁体   English

难以在特定目录中安装R包

[英]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的AWS服务器上安装软件包。 concerto$mediaPath is a list item that targets a writable directory. Concerto $ mediaPath是一个以可写目录为目标的列表项。

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. 运行命令后,它似乎安装RCurl没有错误,但库命令产生一个错误,表示无法找到“RCurl”。 If I do: 如果我做:

dir(lib)

It says that "bitops" is in the created folder but not "RCurl". 它说“bitops”在创建的文件夹中,但不是“RCurl”。 I believe RCurl has a dependency on bitops which explains why it was installed but not why RCurl did not install. 我相信RCurl依赖于bitops,这解释了为什么它被安装但不是为什么RCurl没有安装。

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: 如果您确定可以创建该目录并且可以在.libPaths()上看到它...那么您还需要确保您的系统配置为在DESCRIPTION文件中满足此要求:

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() 来自.libPaths()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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