问题描述
我在 StatET 中加载库 rgdal
时遇到问题。
library(rgdal)
Loading required package: sp
Error: package or namespace load Failed for ‘rgdal’ in dyn.load(file,DLLpath = DLLpath,...):
unable to load shared object '/usr/local/lib/R/site-library/rgdal/libs/rgdal.so':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block
但是,安装似乎有效。当我从普通的 R 控制台加载库时,它工作正常:
library(rgdal)
Loading required package: sp
rgdal: version: 1.5-18,(SVN revision 1082)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.0.4,released 2020/01/28
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 6.3.1,February 10th,2020,[PJ_VERSION: 631]
Path to PROJ shared files: /usr/share/proj
Linking to sp version:1.4-4
To mute warnings of possible GDAL/OSR exportToProj4() degradation,use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
1/ 试图设置 LD_LIBRARY_PATH
。但没有爱...
2/ 尝试在 Eclipse/StatET 的 R 环境配置中添加 /usr/local/lib/R/site-library/rgdal/libs
作为新的“站点库”。还是没有爱...
一些系统信息:
R> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 20
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=sv_SE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=sv_SE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=sv_SE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics Grdevices utils datasets methods base
other attached packages:
[1] rgdal_1.5-18 sp_1.4-4
loaded via a namespace (and not attached):
[1] compiler_3.6.3 grid_3.6.3 lattice_0.20-41
我的linux系统:
~$ uname -a
Linux darkstar 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)