简体   繁体   中英

Cannot load R package gmm on newest macbook with Apple M1 chip

I'm trying to load package gmm (running "library(gmm)") and get this error message below.

It seems unfixable, as it states that my gfortran/lib/libgomp.1.dylib has the wrong architecture? I'm guessing this is related to the new Mac architecture?

library(gmm) Loading required package: sandwich

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: no suitable image found. Did find:

**/usr/local/gfortran/lib/libgomp.1.dylib: mach-o, but wrong architecture**
/usr/local/gfortran/lib/libgomp.1.dylib: mach-o, but wrong architecture

I had the same issue on R version 4.1. Found a similar question here which points to installing (or updating) your gfortran installation here . Once I did that and restarted R, the gmm package was able to find the missing image(s) automatically when I loaded the package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM