我正在尝试下载ggpubr
包。我的R studio版本是3.5.2。我一直在尝试通过以下方式安装ggpubr
库:
install.packages("ggpubr")
和
if(!require(devtools)) install.packages("devtools")devtools::install_github("kassambara/ggpubr)
但是当我这样做的时候,我得到了这个错误:
clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘conquer’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/conquer```
#Followed by:
../libtool: line 1099: ERROR:: command not found
make[2]: *** [libutil.la] Error 127
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
ERROR: configuration failed for package ‘nloptr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
ERROR: dependency ‘conquer’ is not available for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/quantreg’
Warning in install.packages :
installation of package ‘quantreg’ had non-zero exit status
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
ERROR: dependencies ‘pbkrtest’, ‘quantreg’, ‘lme4’ are not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rstatix’
Warning in install.packages :
installation of package ‘rstatix’ had non-zero exit status
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggpubr’
Warning in install.packages :
installation of package ‘ggpubr’ had non-zero exit status
我不知道该怎么办。我已经尝试独立安装conquer
,以及其他一些没有帮助的东西……
我尝试了简单地使用install.package("ggpubr")
,也尝试了if(!require(devtools)) install.packages("devtools") devtools::install_github("kassambara/ggpubr")
。
有人知道该怎么做吗?
发布于 2021-01-08 21:45:53
其中一个依赖项仅适用于R >= 4
,因此您需要手动安装旧版本的nloptr
。
解决方案是手动安装旧版本的依赖项(nloptr):
packageurl<-"https://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.2.1.tar.gz"
然后:
install.packages(packageurl, repos=NULL, type="source")
https://stackoverflow.com/questions/64939242
复制相似问题