-
#先选择镜像,然后安装
-
options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
-
install.packages("devtools")
报错
ERROR: configuration failed for package ‘openssl’ * removing ‘/home/huiweiwang/R/x86_64-pc-linux-gnu-library/4.2/openssl’ Warning in install.packages : installation of package ‘openssl’ had non-zero exit status * installing *source* package ‘httpuv’ ... ** package ‘httpuv’ successfully unpacked and MD5 sums checked ** using staged installation ** Using bundled copy of libuv ** PKG_CFLAGS=-Ilibuv/include ** PKG_LIBS=./libuv/.libs/libuv.a
方法1:最后用conda直接安装,退出R,然后输入代码
conda install r-devtools
对于其他有binary版本的R包,遇到had non-zero exit status
报错,
当我install.packages("gXXXX")
的时候,出现了烦人的报错——had non-zero exit status
。install.packages("xx",type="binary")
应该也都可以轻松解决。
You have a lot of outdated packages that are causing installation issues and you are using a quite old R version, I recommend you to update R to the latest version
update.packages(repos='http://cran.rstudio.com/', ask=FALSE, checkBuilt=TRUE)
Then you can try to install devtools
again