I would like to use some r-scripts from processing toolbox but I get this error massage:

The downloaded source packages are in
Warning message:
In install.packages("rgdal", dependencies = TRUE) :
installation of package ârgdalâ had non-zero exit status
tryCatch(find.package("raster"), error=function(e) install.packages("raster", dependencies=TRUE))
[1] "/usr/local/lib/R/site-library/raster"
Loading required package: sp
Error in library("rgdal") : there is no package called ârgdalâ
Execution halted

I installed r-base and r-base-dev 3.4 from CRAN-repository. R is activated as provider in my QGIS 2.18.9 processing toolbox.

EDIT: I also tryed to install RGDAL via R and got a similar error:

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-7
checking for /usr/bin/svnversion... no
configure: svn revision: 660
checking for gdal-config... no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/site-library/rgdal’

The downloaded source packages are in
Warning message:
In install.packages("rgdal") :
  installation of package ‘rgdal’ had non-zero exit status
Error in library(rgdal) : there is no package called ‘rgdal’

Are you using ubuntu by any chance? I would post as comment to find out but don't have the rep.

I had this problem earlier in the year. Try

sudo apt-get install aptitude
sudo aptitude install libgdal-dev 
sudo aptitude install libproj-dev

and then installing rgdal.

If you are not using ubuntu I don't have a sure answer but it looks like you need to do some prior set up to get a gdal-config file before installing the package. There is a MAC OS solution here

  • If you have GDAL 1.x installed, you might add libgdal1-dev. – AndreJ Jun 20 '17 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.