Ubuntu:无法向所有用户安装R软件包

时间:2019-11-22 06:11:26

标签: r ubuntu rstudio

无法使用以下命令向所有用户安装R软件包:

root@ubuntu:~# sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\""

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software .....

> install.packages('devtools', repos='http://cran.rstudio.com/')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://cran.rstudio.com/src/contrib:
  cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
Warning message:
package ‘devtools’ is not available (for R version 3.4.4) 
> 

但是我可以通过以下方式安装它:

root@ubuntu:~# R
>install.packages('devtools', repos='http://cran.rstudio.com/')

那我应该知道些什么?谢谢。

0 个答案:

没有答案