I am trying to install 'rdgal' package in R 3.5 (Ubuntu 18.04), however, R shows this error:
configure: R_HOME: /opt/R/3.5.3/lib/R
configure: CC: gcc
configure: CXX: g++
configure: C++11 support available
configure: rgdal: 1.4-7
checking for /usr/bin/svnversion... yes
configure: svn revision: 845
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/sergiob/R/x86_64-pc-linux-gnu-library/3.5/rgdal’
The downloaded source packages are in
‘/tmp/Rtmp0rrlnK/downloaded_packages’
Warning message:
In install.packages("rgdal") :
installation of package ‘rgdal’ had non-zero exit status
However, GDAL seems to be installed in the system, using gdalinfo --version
GDAL 2.2.3, released 2017/11/20
and using dpkg -l | grep gdal | cut -c-72
(seems that Ubuntu have two versions: 2.2 and 2.4)
ii gdal-bin 2.2.3+dfsg-2
ii gdal-data 2.4.2+dfsg-1~bionic0
ii libgdal20 2.2.3+dfsg-2
ii python-gdal 2.2.3+dfsg-2
ii python3-gdal 2.2.3+dfsg-2
Also, I have installed QGIS 3.13 (with a GDAL/ORG 2.2.3) but I cannot identify if this is the real problem.
I tried to re-install all dependencies and packages, including sudo apt-get install libgdal-dev libproj-dev
, but not solve nothing.
I tried to review all posts about this issue, however, I can solve this problem yet.
Thre are a way to R to recognize the GDAL installed in Ubuntu 18.04?