Reputation: 83
Hi guys I tried to install this package in R but i can't load it.
install.packages("gmm")
library(gmm)
Apparently the installation is successful but when I try to load it an error occurs
Error: package or namespace load failed for ‘gmm’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/gmm/libs/gmm.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/gmm/libs/gmm.so, 6): Library not loaded: /usr/local/gfortran/lib/libgomp.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/gmm/libs/gmm.so
Reason: image not found
I am using a macOS with BigSur version 11.0.1 and the R version is 4.1.0 also R Studio version is 1.4.1106
I don't know how to solve this problem
Hope anyone can help me
Upvotes: 2
Views: 2049
Reputation: 83
I solved the problem by downloading "gfortran-10.2-Catalina.dmg" from this website
https://github.com/fxcoudert/gfortran-for-macOS/releases which was suggested in the comments.
Although my mac version is BigSur, the Catalina file worked well.
Thanks to @BenBolker for helping me
Upvotes: 2