rgdal cannot find GDAL

This post is very very short, but I think that it will be very useful, especially for MAC OS X users.

While installing rgdal package installing in an R console on OSX you can get the error as in title. That because the GDAL and PROJ frameworks may be installed in different paths.

In this case, simply force these installation paths in the following way:

install.packages("rgdal", configure.args='--with-gdal-config=/path/GDAL.Framework/.../gdal-config --with-proj-include=/path/PROJ.framework/.../include --with-proj-lib=/path/PROJ.framework/.../lib/')

Below, the path I had to use:

install.packages("rgdal", configure.args='--with-gdal-config=/Library/Frameworks/GDAL.Framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib/')

That’s all! GWH!!

About Francesco Serafin

I am a PhD student at the Department of Civil, Environmental and Mechanical Engineering at the University of Trento. My two greatest loves: Computer Science and Water (take three with my Lenovo!:D). As a result, the aim of my life is to make both passions coexist. My gpg public key available at https://pgp.mit.edu

Leave a Reply

Your email address will not be published.

*