r - 在Centos上安装R 'sf'包——gdal共享库错误

标签 r linux

如何在 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),但这根本不会改变错误。

最佳答案

  1. /usr/local/lib 添加到例如/etc/ld.so.conf.d/libgdal-x86_64.conf
  2. 运行 ldconfig
  3. 重新启动 R
  4. 再试一次

关于r - 在Centos上安装R 'sf'包——gdal共享库错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46181614/

相关文章:

r - 检查在 Shinyapps.io 上部署的库的版本

r - 如何将 dplyr::tbl 连接编码更改为 utf8?

r - ggplot() 图中的 2 个多项式回归

linux - 从 Linux 中的进程中释放内存?

linux - org.springframework.dao.InvalidDataAccessApiUsageException : Unable to determine the correct call signature - no procedure/function/signature for

c++ - GCC 4.9.1 在 RHEL 6.0 上编译失败,编译错误在 "libsanitizer"

r - 小数据帧导致R崩溃

r - 有没有办法选择性地应用这个 stringr 函数?

linux - 在 Debian Wheezy Web 服务器上禁用文件缓存

linux - linux系统调用mmap(2)和posix mmap(3)函数有什么区别?