如何在 CentOS 上安装 R 'sf'
软件包?在尝试安装时,我最初由于 gdal 软件包过时而收到错误;我更新了 gdal (从以下源构建: http://trac.osgeo.org/gdal/wiki/BuildingOnUnix ),现在出现错误:
checking GDAL: linking with --libs only... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ.4 is available for linking:... yes
checking GDAL: checking whether PROJ.4 is available fur running:...
./gdal_proj: error while loading shared libraries: libgdal.so.20: cannot open
shared object file: No such file or directory
no
configure: error: OGRCoordinateTransformation() does not return a
coord.trans:
PROJ.4 not available?
ERROR: configuration failed for package ‘sf’
我尝试创建一个到 libgdal.so.20
的符号链接(symbolic link),但这根本不会改变错误。
最佳答案
- 将
/usr/local/lib
添加到例如/etc/ld.so.conf.d/libgdal-x86_64.conf
- 运行 ldconfig
- 重新启动 R
- 再试一次
关于r - 在Centos上安装R 'sf'包——gdal共享库错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46181614/