简体   繁体   English

无法在Red Hat linux上安装rgdal和rgeos R库

[英]Unable to install rgdal and rgeos R libraries on Red hat linux

I have error while compiling rgdal adn rgoes package on our redhat linux machine. 我在redhat linux机器上编译rgdal adn rgoes包时rgdal adn rgoes错误。 I tried to do some research but couldn't find a possible solution. 我试图做一些研究,但找不到可能的解决方案。 Could you please help me with this as this is very important for me to solve. 能不能帮我解决这个问题,因为这对我来说非常重要。

**ERROR WHILE COMPILING RGDAL in R 3.0**

**strong text**
* installing *source* package ârgdalâ ...
** package ârgdalâ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 0.8-10
checking for /usr/bin/svnversion... yes
configure: svn revision: 496
configure: gdal-config: gdal-config
checking gdal-config usability... ./configure: line 1397: gdal-config: command not found
no
Error: gdal-config not found
The gdal-config script distributed with GDAL could not be found.
If you have not installed the GDAL libraries, you can
download the source from  http://www.gdal.org/
If you have installed the GDAL libraries, then make sure that
gdal-config is in your path. Try typing gdal-config at a
shell prompt and see if it runs. If not, use:
--configure-args='--with-gdal-config=/usr/local/bin/gdal-config'
with appropriate values for your installation.

ERROR: configuration failed for package ârgdalâ


*****ERROR WHILE COMPILING RGEOS:*****
**strong text**
* installing *source* package ârgeosâ ...
** package ârgeosâ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgeos: 0.2-17
checking for /usr/bin/svnversion... yes
configure: svn revision: 413M
checking geos-config usability... ./configure: line 1385: geos-config: command not found
no
configure: error: geos-config not usable
ERROR: configuration failed for package ârgeosâ

On fedora 20 you need to install geos and geos-devel ! 在fedora 20上,你需要安装geosgeos-devel

sudo yum install geos geos-devel

After that the compilation in R work well! 之后,R中的编译工作得很好!

** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (gstat)

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

I'm not on redhat (I'm on Ubuntu) so someone who is may be able to give better package names.. . 我不是在使用redhat(我在Ubuntu上),所以有人可以提供更好的软件包名称。 But, when installing packages from source, you need the dev of the required libraries. 但是,从源代码安装软件包时,需要dev所需的库。 In this case, you probably need to install: 在这种情况下,您可能需要安装:

libgdal1-dev
libgeos-dev

So: 所以:

yum install libgdal1 libgdal1-dev libgeos libgeos-dev

Then in R: 然后在R:

install.packages('gdal')

this is untested, since I don't want all the extra packages associated with those two! 这是未经测试的,因为我不希望所有额外的包与这两个相关联!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM