简体   繁体   English

无法在具有 Apple M1 芯片的最新 macbook 上加载 R package gmm

[英]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.我正在尝试加载 package gmm(运行“库(gmm)”)并在下面收到此错误消息。

It seems unfixable, as it states that my gfortran/lib/libgomp.1.dylib has the wrong architecture?它似乎无法修复,因为它指出我的 gfortran/lib/libgomp.1.dylib 的架构错误? I'm guessing this is related to the new Mac architecture?我猜这与新的 Mac 架构有关?

library(gmm) Loading required package: sandwich library(gmm) 需要加载 package:三明治

Error: package or namespace load failed for 'gmm' in dyn.load(file, DLLpath = DLLpath, ...):错误:package 或 dyn.load 中“gmm”的命名空间加载失败(文件,DLLpath = DLLpath,...):

unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/gmm/libs/gmm.so':无法加载共享 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 dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/gmm/libs/gmm.so, 6):库未加载:/usr/local/gfortran/lib/libgomp.1.dylib 引用自:/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.我在 R 4.1 版上遇到了同样的问题。 Found a similar question here which points to installing (or updating) your gfortran installation here .在这里找到了一个类似的问题,它指向此处安装(或更新)您的gfortran安装。 Once I did that and restarted R, the gmm package was able to find the missing image(s) automatically when I loaded the package.一旦我这样做并重新启动 R, gmm package 能够在我加载 package 时自动找到丢失的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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