• Uncategorized

About r : rgdal-installation-error-on-ubuntu-1710

Question Detail

I am trying to install rgdal library on R, but I am facing some difficulties. Maybe I is a naive error or pure newbie :P. I am running:

Distributor ID: Ubuntu ; Description: Ubuntu 17.10 ; Release: 17.10 ; Codename: artful

R version 3.4.2 (2017-09-28) — “Short Summer” ;
Copyright (C) 2017 The R Foundation for Statistical Computing ;
Platform: x86_64-pc-linux-gnu (64-bit)

When I try install.packages(‘rgdal’) the following error shows:

Installing package into ‘/home/jonathan/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying 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’ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.2-18
checking for /usr/bin/svnversion... no
configure: svn revision: 718
checking for gdal-config... no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/jonathan/R/x86_64-pc-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

I tried this and this, but none was helpfull.
Thank you for the support.

Question Answer

error: gdal-config not found

Is gdal installed ? ….

Solution : sudo apt install libgdal-dev : Provides /usr/bin/gdal-config

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.