Skip to content

Error installing 'rgdal' on Centos 7

6 messages · Manuel Pizarro Gavilán, Roger Bivand, ONKELINX, Thierry +1 more

#
Hello:

I can't install the ' rgdal ' package in R and ' GDAL ' on CentOS 7  
(ELGIS repo added).

Is there any solution?

Thanks
#
Please do not cross-post. Please do provide sufficient information to help 
diagnose your problem (here the output of the ./configure run during 
installation). Almost certainly you are trying to install from source when 
one or more external dependency is not satisfied. Did you read:

http://cran.r-project.org/bin/linux/redhat/README

and note that R-rgdal is *not* provided as a binary?

Did you read:

http://cran.r-project.org/web/packages/rgdal/index.html

Did you download the source package and read the README file, also on 
R-Forge linked from the CRAN page:

https://r-forge.r-project.org/scm/viewvc.php/pkg/inst/README?view=markup&revision=409&root=rgdal

Roger
On Thu, 15 Jan 2015, Manuel Pizarro Gavil?n wrote:

            

  
    
#
Hello Roger:

Thank you for your email.

Some details for the problem.

This is the message of the console in R:


------------------
install.packages("rgdal")
Installing package into  
?/home/aliendist/R/x86_64-redhat-linux-gnu-library/3.1?
(as ?lib? is unspecified)
probando la URL 'http://cran.rstudio.com/src/contrib/rgdal_0.9-1.tar.gz'
Content type 'application/x-gzip' length 1624496 bytes (1.5 Mb)
URL abierta
==================================================
downloaded 1.5 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: 0.9-1
checking for /usr/bin/svnversion... yes
configure: svn revision: 518
configure: gdal-config: gdal-config
checking gdal-config usability...
./configure: line 2119: 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?
* removing ?/home/aliendist/R/x86_64-redhat-linux-gnu-library/3.1/rgdal?
Warning in install.packages :
   installation of package ?rgdal? had non-zero exit status

The downloaded source packages are in
         ?/tmp/Rtmpeaf9P4/downloaded_packages?
-------------------

I tried to install gdal -dev and gdal but it is impossible.

Regards,
Manuel






Roger Bivand <Roger.Bivand at nhh.no> escribi?:

  
    
#
On Fri, 16 Jan 2015, Manuel Pizarro Gavil?n wrote:

            
No, it isn't. Install PROJ.4 first then GDAL from source, and everything 
is under your control.

The README file I referred to does list the RPMs needed, but you will do 
better choosing the drivers for GDAL you need yourself, installing their 
dependencies, and building at least PROJ.4 and GDAL from source. Centos 7 
does not yet seem to be well supported anywhere for these, and for 6 the 
versions are typically old or very old.

http://download.osgeo.org/proj/proj-4.8.0.tar.gz
http://download.osgeo.org/proj/proj-datumgrid-1.5.zip

then

http://download.osgeo.org/gdal/1.11.1/gdal-1.11.1.tar.gz

Remember to run ldconfig after installing to make the shared objects 
visible.

Roger

  
    
#
Dear Manuel,

The underlying problem is that you have problems installing the GDAL library on your system. Without GDAL you cannot install rgdal on Linux OS. You need to provide more information on why it is impossible to install GDAL on your system.

Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx at inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey

________________________________________
Van: R-sig-Geo [r-sig-geo-bounces at r-project.org] namens Manuel Pizarro Gavil?n [pizarro at ebd.csic.es]
Verzonden: vrijdag 16 januari 2015 11:19
Aan: Roger Bivand
CC: r-sig-geo at r-project.org; r-sig-fedora at r-project.org
Onderwerp: Re: [R-sig-Geo] Error installing 'rgdal' on Centos 7

Hello Roger:

Thank you for your email.

Some details for the problem.

This is the message of the console in R:


------------------
install.packages("rgdal")
Installing package into
?/home/aliendist/R/x86_64-redhat-linux-gnu-library/3.1?
(as ?lib? is unspecified)
probando la URL 'http://cran.rstudio.com/src/contrib/rgdal_0.9-1.tar.gz'
Content type 'application/x-gzip' length 1624496 bytes (1.5 Mb)
URL abierta
==================================================
downloaded 1.5 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: 0.9-1
checking for /usr/bin/svnversion... yes
configure: svn revision: 518
configure: gdal-config: gdal-config
checking gdal-config usability...
./configure: line 2119: 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?
* removing ?/home/aliendist/R/x86_64-redhat-linux-gnu-library/3.1/rgdal?
Warning in install.packages :
   installation of package ?rgdal? had non-zero exit status

The downloaded source packages are in
         ?/tmp/Rtmpeaf9P4/downloaded_packages?
-------------------

I tried to install gdal -dev and gdal but it is impossible.

Regards,
Manuel






Roger Bivand <Roger.Bivand at nhh.no> escribi?:
--
Manuel Pizarro
EBD-CSIC

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Disclaimer<https://www.inbo.be/nl/disclaimer-mailberichten-van-het-inbo>
13 days later
#
Hello,

And I'm sorry for the delay in answering.

In CentOS 7, try using "epel" -repo, there is an essential part of tools 
in that repo.

You can find gdal and gdal-devel rpm's there, and they are relatively 
recent versions also.

I'm not sure, but you would probably need/want to install geos-devel and 
proj-epsg also.

----8<----
[root at localhost R]# repoquery -i gdal-devel

Name        : gdal-devel
Version     : 1.11.0
Release     : 2.el7
Architecture: x86_64
Size        : 681767
Packager    : Fedora Project
Group       : Development/Libraries
URL         : http://www.gdal.org
Repository  : epel
Summary     : Development files for the GDAL file format library
Source      : gdal-1.11.0-2.el7.src.rpm
Description :
This package contains development files for GDAL.

[root at localhost R]# repoquery -l gdal-devel | grep config
/usr/bin/gdal-config
/usr/bin/gdal-config-64
/usr/include/gdal/cpl_config-64.h
/usr/include/gdal/cpl_config.h
/usr/include/gdal/cpl_config_extras.h
/usr/lib64/pkgconfig/gdal.pc
/usr/share/man/man1/gdal-config.1.gz
----8<----

br,

Esa ?string, SW Architect / Data scientist
Infotripla Oy, Finland
On 01/15/2015 12:09 PM, Manuel Pizarro Gavil?n wrote: