无论我是通过install.packages还是BiocManager安装,我都在一台新计算机上使用R进行工作,并且RCurl的安装失败。安装过程中出现错误,提示无法将共享对象加载到应在安装过程中创建的00LOCK临时文件夹中。
我尝试通过基本R和BiocManager都安装软件包,并且从这两个软件包都收到相同的错误。我试图找到该目录。
我从install.packages或BiocManager看到相同的结果(安装失败):
install.packages("RCurl")
BiocManager::install("RCurl")
我希望该软件包能够成功安装,就像我在另一台计算机上使用相同版本的R中的相同版本的软件包一样。两台机器都使用CentOS。
这是我输出的结尾。请注意,它给出了关于在失败之前无法在base R中找到函数的特殊警告。我无法确定其含义或是否与问题相关。
主要问题(无法安装软件包)似乎源于在临时目录中找不到的临时安装文件。
...
scp html
url.exists html
Rd warning: /tmp/RtmpQ0xtWg/R.INSTALL238373ec51cea/RCurl/man/url.exists.Rd:5: file link ‘file.exists’ in package ‘base’ does not exist and so has been treated as a topic
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/nfs/stak/users/naglemi/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-RCurl/00new/RCurl/libs/RCurl.so':
libicui18n.so.58: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/nfs/stak/users/naglemi/R/x86_64-redhat-linux-gnu-library/3.6/RCurl’
The downloaded source packages are in
‘/tmp/RtmpByFsFq/downloaded_packages’
Warning message:
In install.packages("RCurl") :
installation of package ‘RCurl’ had non-zero exit status
我在这里尝试解决类似问题: R packages: RCurl and curl packages install failure on Linux
...通过将我的LD_LIBRARY_PATH都设置为/ lib64 /和/nfs/stak/users/naglemi/R/x86_64-redhat-linux-gnu-library/3.6/RCurl/libs /
...但是无论如何继续收到相同的错误。
感谢所有帮助!
更新:我通过像这样(https://github.com/conda/conda/issues/4355)通过conda安装软件包来使其工作。发生安装错误时,我没有通过conda运行R,并且仍然不知道问题的原因。但是,现在我可以使该程序包在conda环境中内外均可工作(只要我在conda库中指定了lib.loc)