无法安装Rgdal(Centos)

时间:2017-10-23 16:40:46

标签: r centos gdal rgdal

您好我尝试安装RGDAL时遇到问题。如果发现有类似问题的其他帖子,但解决方案总是限于Debian发行版,你能帮我解决这个问题吗?

这是我在RStudio中运行以下命令时出现的错误:> install.packages(" rgdal",dependencies = T)

Installing package into ‘/home/dial/R/x86_64-redhat-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.2-13.tar.gz'
Content type 'application/x-gzip' length 1648119 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64
configure: rgdal: 1.2-13
checking for /usr/bin/svnversion... no
configure: svn revision: 686
checking for gdal-config... /home/dial/anaconda2/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.1.0
checking GDAL version >= 1.6.3... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no

后跟一堆像这样的行:

/usr/bin/ld: warning: libnetcdf.so.11, needed by /home/dial/anaconda2/lib/libgdal.so, not found (try using -rpath or -rpath-link)

最后:

collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/dial/R/x86_64-redhat-linux-gnu-library/3.4/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp8UHPBS/downloaded_packages’

这是在CentOS上运行的服务器上完成的。我想以下信息可能会有所帮助:

$ gdal-config --version 
2.1.0
$ which gdal-config 
~/anaconda2/bin/gdal-config
$ gdal-config --libs 
-L/home/dial/anaconda2/lib -lgdal

你能帮我安装一下吗?

0 个答案:

没有答案