当前位置:   article > 正文

在linux中关于R包devtools的安装_conda 安装devtools

conda 安装devtools
  1. #先选择镜像,然后安装

  2. options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))

  3. 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 statusinstall.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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/477384
推荐阅读
相关标签
  

闽ICP备14008679号