首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >20发行centos rgdal

20发行centos rgdal
EN

Stack Overflow用户
提问于 2018-03-23 20:50:05
回答 1查看 6.5K关注 0票数 5

有人能帮我理解rgdal的问题吗?

我为centos 6 64位安装了gdal 2,但是我没有成功地安装rgdal。我试图弄清楚是什么问题,但我没有在网上找到任何有用的东西。

这是Rstudio-服务器控制台:

代码语言:javascript
复制
 install.packages("rgdal")
 Installing package into ‘/home/admin/R/x86_64-redhat-linux-gnu-library/3.4’
 (as ‘lib’ is unspecified)
 essai de l'URL 'https://cran.rstudio.com/src/contrib/rgdal_1.2-18.tar.gz'
 Content type 'application/x-gzip' length 1650578 bytes (1.6 MB)
  ==================================================
 downloaded 1.6 MB

 * installing *source* package ‘rgdal’ ...
 ** package ‘rgdal’ correctement décompressé et sommes MD5 vérifiées
 configure: CC: gcc -m64 -std=gnu99
 configure: CXX: g++ -m64
 configure: rgdal: 1.2-18
 checking for /usr/bin/svnversion... yes
 configure: svn revision: 718
 checking for gdal-config... /usr/local/bin/gdal-config
 checking gdal-config usability... yes
 configure: GDAL: 2.2.3
 checking GDAL version >= 1.6.3... yes
 checking gdal: linking with --libs only... yes
 checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
 configure: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-        protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC  -I/usr/local/include
  checking proj_api.h presence and usability... yes
 ./proj_conf_test1: error while loading shared libraries: libgdal.so.20:   cannot open shared object file: No such file or directory
  checking PROJ.4 version: ... < 4.8.0
./configure: line 2030: test: -eq: unary operator expected
  ./configure: line 2035: test: -ge: unary operator expected
  ./configure: line 2063: test: -ge: unary operator expected
  ./proj_conf_test2: error while loading shared libraries: libgdal.so.20:                cannot open shared object file: No such file or directory
  checking PROJ.4: epsg found and readable... yes
  ./configure: line 2138: test: -ge: unary operator expected
  ./proj_conf_test3: error while loading shared libraries: libgdal.so.20:    cannot open shared object file: No such file or directory
  checking PROJ.4: conus found and readable... yes
  configure: Package CPP flags:  -I/usr/local/include
  configure: Package LIBS:  -L/usr/local/lib -lgdal -lproj
  configure: creating ./config.status
  config.status: creating src/Makevars
  ** libs
  ogr_geom.cpp:39: attention : ‘mp_count_k0’ may be used uninitialized in this function

  ** R
  ** data
  ** inst
  ** preparing package for lazy loading
  ** help
  *** installing help indices
    converting help for package ‘rgdal’
      finding HTML links ... fini
      CRS-class                               html  
  ...
     closeDataset-methods                    html  
     displayDataset                          html  
     llgrid                                  html  
     Rd warning: /tmp/RtmpTT9ff6/R.INSTALL19d55c4b60f4/rgdal/man/llgrid.Rd:11: missing file link ‘Spatial’
     Rd warning: /tmp/RtmpTT9ff6/R.INSTALL19d55c4b60f4/rgdal/man/llgrid.Rd:16: missing file link ‘gridat’
     Rd warning: /tmp/RtmpTT9ff6/R.INSTALL19d55c4b60f4/rgdal/man/llgrid.Rd:17: missing file link ‘gridat’
         make_EPSG                               html  
         nor2k                                   html  
         projInfo                                html  
         project                                 html  
         readGDAL                                html  
     Rd warning: /tmp/RtmpTT9ff6/R.INSTALL19d55c4b60f4/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: package or namespace load failed for ‘rgdal’ in          dyn.load(file, DLLpath = DLLpath, ...):
      impossible de charger l'objet partagé '/home/admin/R/x86_64-redhat-         linux-gnu-library/3.4/rgdal/libs/rgdal.so':
       libgdal.so.20: Ne peut ouvrir le fichier d'objet partagé: Aucun    fichier ou dossier de ce type
  Erreur : le chargement a échoué
 Exécution arrêtée
     ERROR: loading failed
     * removing ‘/home/admin/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/RtmpBon7nM/downloaded_packages’

我试图安装gdal的依赖项并将libgdal.so.20复制到/user/lib64 64/ogdi,但没有成功!*

谢谢你的帮助

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-24 15:25:33

解决办法太简单了!CentOS找不到这些库,我只是将这些库复制到64个文件夹中。

cp /usr/local/lib/libgdal.so.20* /usr/lib64/

一切都像魔法一样运作!

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49458128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档