无法在RHEL6上的R中安装rgdal软件包,无法加载共享对象rgdal.so [英] Cannot install rgdal package in R on RHEL6, unable to load shared object rgdal.so
问题描述
我有安装(编译)rgdal 1.9.2和proj软件包的AWS RHEL6服务器.现在在R中,我想安装rgdal软件包,但是会出现此错误:
I have AWS RHEL6 server where I've installed (compiled) rgdal 1.9.2 and proj packages. Now in R I want to install rgdal package but it gives this error:
**测试是否可以加载已安装的软件包
dyn.load中的错误(文件,DLLpath = DLLpath,...):
无法加载共享对象'/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal/libs/rgdal.so':
libgdal.so.1:无法打开共享库文件:无此文件或目录 错误:加载失败
执行停止
错误:加载失败
*删除"/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal" install.packages中的警告:
安装软件包"rgdal"的退出状态为非零
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal/libs/rgdal.so':
libgdal.so.1: cannot open shared object file: No such file or directory Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal’ Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
完整安装日志可在此处找到.
Full install log can be found here.
当我在Linux中找到rgdal.so时,找不到任何东西.我也找不到如何获得rgdal.so的内容.
When I do locate rgdal.so in Linux it doesn't find anything. I can also not find how to get rgdal.so of what it is part of.
有人对如何解决此问题有任何想法吗?
Has anyone any idea on how to fix this?
推荐答案
我已修复:
由于最后的错误,我也错过了日志中的错误:
There is an error further up in the log as well that I had missed because of the error at the end:
./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory
libgdal.so.1在/usr/local/lib中的系统上.
libgdal.so.1 was on the system in /usr/local/lib.
然后我做了:
echo "/usr/local/lib" >> /etc/ld.so.conf.d/R-dependencies-x86_64.conf
ldconfig
这解决了我在OP中提到的后续错误.
This fixed the subsequent error that I mentioned in the OP.
这篇关于无法在RHEL6上的R中安装rgdal软件包,无法加载共享对象rgdal.so的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!