I just upgraded my laptop to macOS big sur, but then I could not library "rgdal" and "gdalUtils". It threw me an error:

Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so': dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /usr/lib/libpq.5.dylib Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so Reason: image not found

It worked well under Catalina but not big sur.

Would anyone help me?


Same happened to me, but worked after I uninstalled rgdal and reinstalled from source.

install.packages("rgdal", type = "source")

and then restart RStudio

  • Thanks, Bob! It works.
    – Liam Zhong
    Dec 5 '20 at 21:28

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.