我已经将R的版本上传到4.0.2(2020-06-22)。
当我需要时安装 gmm 包后,我收到以下消息。我还为其他软件包(例如 TropFishR)采纳了此消息。我有 Xcode 10.3 。我重新安装了R studio和R几次。非常感谢您的宝贵时间。
错误信息:
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
session info:
version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base
other attached packages:
[1] sandwich_2.5-1
loaded via a namespace (and not attached):
[1] zoo_1.8-8 compiler_4.0.2
[3] tools_4.0.2 grid_4.0.2
[5] lattice_0.20-41
问题的产生是因为Library not loaded: /usr/local/gfortran/lib/libgomp.1.dylib
被错过了。
为了解决这个问题,我去了this https://github.com/fxcoudert/gfortran-for-macOS/releasesGithub发布页面,已下载gfortran-10.2-Catalina.dmg
,并安装了它。然后我终于可以加载了gmm
R 中的包。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)