Vaughn Smith
Vaughn Smith

Reputation: 23

R version 3.4.0 rgdal will not load

I recently installed the latest version of R (3.4.0) and installed all of my packages, but for some reason rgdal will not load and I'm getting this message:

library(rgdal) Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /Builds/unix/recipes/build/gdal-2.1.3-obj/libgdal.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so Reason: image not found

I went to the rgdal/libs directory and the rgdal.so file exists, but for some reason doesn't want to load. Anyone else have this issue or a similar one?

Upvotes: 1

Views: 3391

Answers (3)

Peter Nilsson
Peter Nilsson

Reputation: 3

Seems to be related to my issue posted same day, Unable to load pgirmess library ("image not found") - R 3.4 in Mac OS .

I installed the previous version of R from CRAN (3.3.3), and it works fine. You can have both versions installed at the same time. Maybe not a long term solution but at least a temporary fix so your work can continue.

Upvotes: 0

Juan Enciso
Juan Enciso

Reputation: 320

Do you have GDAL OS X frameworks installed? If not, go to William Kyngesburye's site, download and install frameworks in the following order:

  1. GDAL Complete
  2. GSL Framework
  3. FreeType
  4. cairo

After completing this installation, go for steps 2 and 3 of this answer, and then, install rgdal from R.app using these specifications in the install.packages command.

It solved the problem for me, hope it helps you!

Upvotes: 1

Ka_Papa
Ka_Papa

Reputation: 135

Try installing RStudio and re-download it from there or type install.packages("rgdal"). If none of these work try installing another package and see if you can run it, because it is either the directory, the package or the version of the package is not compatible with the version of the language.

Upvotes: 1

Related Questions