Skip to content
Prev 10549 / 29559 Next

Installation of rgdal from CRAN on MACOSX does not work

On Wed, 29 Dec 2010, Agustin Lobo wrote:

            
Please do read the error message:
'/Library/Frameworks/R.framework/Versions/2.12/Resources/library/rgdal/libs/i$
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/rgdal$
/Library/Frameworks/R.framework/Versions/2.12/Resources/library/rgdal/libs/i3$
The image that is not found is libR.dylib, the main R dylib against which 
rgdal.so is linked. So this is still an issue of your R installation, 
possibly a multi-architecture issue (is libR.dylib the i386 version, 
guessing - is libR64.dylib the 64-bit Intel version?).

Could any OSX users who are using CRAN extra rgdal please help Agus to 
resolve this - it could be that local path modifications are hiding 
libR.dylib, or that R was installed 64-bit only, and the INSTALL_opts= 
argument to install.packages() was not set correctly? I assume that the 
CRAN extras OSX rgdal binary is built against a standard R OSX Intel 
install, which is multi-architecture.

For a fully updated rgdal, the best combination remains installing the 
full GDAL framework from Kyngchaos, the full tools collection:

http://r.research.att.com/tools/
http://cran.r-project.org/bin/macosx/tools

and install from CRAN source. For a lab, the instructor would rather build 
a local OSX rgdal binary package using the tools collection on one 
development machine with all the correct path variables set (R CMD check 
rgdal; R CMD INSTALL --build rgdal), paying attention to 
multi-architectures, and distribute to lab machines from there. This means 
that the lab instructor can keep rgdal updated if need be, as both 
Kyngchaos and CRAN extras rgdal OSX binary packages typically lag CRAN 
source.

Please also note that there are very many very old GDAL binaries out there 
that users pick up and apply, missing all the subsequent bug-fixes and 
improvements - GDAL 1.8.0 release candidate 1 is now out, so we are 
looking at an upgrade to 1.8.0 during January, which Kyngchaos will most 
likely pick up quickly, probably with a current rgdal binary.

Roger