嗨,我一直在尝试从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