当我尝试“ plotly”安装软件包时,它返回以下错误消息:
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** 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
ERROR: dependency ‘data.table’ is not available for package ‘plotly’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/plotly’
Warning in install.packages :
installation of package ‘plotly’ had non-zero exit status
经过快速搜索后,这似乎是由于与MacOS High Sierra不兼容?我能够安装其他包,例如“ ggplot2”。我对R非常陌生,非常感谢您的帮助!
答案 0 :(得分:0)
non-zero exit status
仅表示“软件包”的安装过程中出错。
文件链接:https://cran.r-project.org/src/contrib/plotly_4.8.0.tar.gz
尝试使用以下命令:
install.packages('FILE_PATH', repos=NULL, type = "source",dependencies = TRUE)
这样做,还将下载该软件包的所有依赖项。从源下载将重新编译软件包并安装。