r - 包“eRm”加载失败
问题描述
当尝试通过命令加载“eRm”包(在 macOS 10.14.6 上全新安装 R 版本 4.0.4 / R-Studio 1.3.959)时,library(eRm)
我得到:
Error: package or namespace load failed for ‘eRm’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): no package called ‘mnormt’
我卸载了 eRm 并重新安装了所有依赖项。我也安装了软件包 mnormt:
There is a binary version available but the source version is later:
binary source needs_compilation
mnormt 2.0.0 2.0.1 TRUE
但没有成功。我还能做些什么来解决这个问题?
编辑:
感谢用户@G5W 的提示,我意识到包 mnormt 没有正确编译:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mnormt.so] Error 1
ERROR: compilation failed for package ‘mnormt’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/mnormt’
Warning in install.packages :
installation of package ‘mnormt’ had non-zero exit status
解决方案:在 macOS 10.14.6 上,我必须按照此处所述安装编译器工具:https ://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/一切正常。非常感谢@G5W,您指出了正确的方向。
解决方案
推荐阅读
- python - 如何将熊猫数据框保存到 sav 文件中
- visual-studio - 如何解决链接服务器的多引用问题?
- python - 根据日期时间索引添加数据
- android-studio - Android Studio 损坏安装
- angular - 自动完成 matInput 中的两种方式数据绑定
- node.js - Mocha 从已删除的规范中运行测试
- c# - SelectTagHelper 在模型中不显示没有显式 Id 属性的选定项目
- ios - 当我尝试从不同的视图更改标签文本时,我不断收到此错误
- javascript - 使用 colorsys 从 HSV 转换为 RGB 会给出空值
- css - CSS 类似乎没有正确继承/覆盖属性