r - 在 mac OS high sierra 中安装 data.table 时出现 clang 错误
问题描述
嗨,我一直在尝试从 mac high sierra 和 R studio 安装 data.table。我尝试了以下操作,但出现以下错误。我尝试更新 brew 并安装 xcode。请建议如何解决此错误?非常感谢。
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.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/3.5/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 datasets
[6] methods base
other attached packages:
[1] sp_1.3-1
loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1 grid_3.5.1
[4] lattice_0.20-35
## INSTALLATION OF DATA TABLE
> install.packages("data.table", type = "source",
+ repos = "http://Rdatatable.github.io/data.table")
trying URL
'http://Rdatatable.github.io/data.table/src/contrib/data.table_1.11.7.tar.gz'
Content type 'application/gzip' length 3198790 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
* installing *source* package ‘data.table’ ...
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/data.table’
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
解决方案
推荐阅读
- python - Python,错误/错误,两次打印输出,定义/函数
- java - 如何在启动 MainActivity 之前启动布局 mydialog?
- jupyter-notebook - 无法在我的 Google 云端硬盘中打开 Colab Notebook
- c++ - 对显式实例化的模板函数的未定义引用
- android - 从相机拍摄并编码为 Base64 的图像质量很差
- java - 扩展 Kotlin 基类的 Java 类不能调用基类的内部方法
- c# - 运行 .NET Core API Linux 环境启动配置文件
- python - 如何将连续的“async with”语句重写为循环?
- javascript - createJS - 未捕获的 ReferenceError:未定义 lib
- parameters - Rails 5 参数和 to_h