1

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?

1 Answer 1

2

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

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

and then restart RStudio

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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