在堆栈中已经有很多这样的问题了......我发现了很多问题,但它并不能解决我的问题。通过源码安装rgdal
这些是我以前试过的东西。去CRAN网站 cran.r-project.org/web/packages/rgdal/index.html
我们看到,为了搭建这个包,我们需要
- GDAL> = 1.6。 3,来自trac.osgeo.org/gdal/wiki/DownloadSource的库和
- PROJ.4(proj> = 4.4.9)from download.osgeo.org/proj/;
此外,我们需要依赖
- 取决于:R(≥3.3.0),方法,SP(≥1.1-0)
但这些都已经安装。
我们已经安装了该系统的依赖,因为
[]$ gdal-config --version
2.1.3
[]$ proj
Rel. 4.4.9, 29 Oct 2004
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
然而,当我们试图通过
install.packages("rgdal_1.2-5.tar.gz",type = "source",repos = NULL,
configure.args=c('--with-proj-include=/usr/local/include','--with-proj-lib=/usr/local/lib'))
的configure.args选择安装的软件包是从答案中 rgdal package installation给
但是,安装时仍然出现错误...这是日志的一部分
*** installing help indices
converting help for package ‘rgdal’
finding HTML links ... done
CRS-class html
GDALDataset-class html
GDALDriver-class html
GDALMajorObject-class html
GDALRasterBand-class html
GDALReadOnlyDataset-class html
GDALReadOnlyDataset-methods html
GDALTransientDataset-class html
GridsDatums html
RGB2PCT html
SGDF2PCT html
SpatialGDAL-class html
closeDataset-methods html
displayDataset html
llgrid html
Rd warning: /tmp/RtmppvlZ6x/R.INSTALL233feb7dc50/rgdal/man/llgrid.Rd:11: missing file link ‘Spatial’
Rd warning: /tmp/RtmppvlZ6x/R.INSTALL233feb7dc50/rgdal/man/llgrid.Rd:16: missing file link ‘gridat’
Rd warning: /tmp/RtmppvlZ6x/R.INSTALL233feb7dc50/rgdal/man/llgrid.Rd:17: missing file link ‘gridat’
make_EPSG html
nor2k html
projInfo html
project html
readGDAL html
Rd warning: /tmp/RtmppvlZ6x/R.INSTALL233feb7dc50/rgdal/man/readGDAL.Rd:136: missing file link ‘flipVertical’
readOGR html
showWKT html
spTransform-methods html
wrappers html
writeOGR html
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/rgdal/libs/rgdal.so':
libgdal.so.20: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/lib64/R/library/rgdal’
Warning message:
In install.packages("rgdal_1.2-5.tar.gz", type = "source", repos = NULL) :
installation of package ‘rgdal_1.2-5.tar.gz’ had non-zero exit status
请注意,在这里引发的警告是apparantly没有显示塞(如在https://groups.google.com/forum/#!topic/batchjobs/TvwTbqrWFyU说的) 如此看来,该系统依赖(GDAL和PROJ)都遇到了......包的依赖关系(方法,sp)也在那里。但是,安装无法找到某些文件.. 我知道从stackoverflow和你可以给R的install.packages()命令提供某些参数......就像上面的代码片段所示..所以它可能是我不是指定足够的路径......或者其对老edgenode别的东西
Atlast,GDAL和凸出的位置由
- @中给定的:在/ usr/local/lib目录/ libgdal。 so.20
- 凸出:/usr/local/lib/libproj.so.0 11时26分32秒
你们可以告诉我们该从哪里出发?