我从dockerhub下载了摇杆/ tidyverse。我尝试安装一个包,并受到了欢迎:
网址' https://cran.rstudio.com/src/contrib/PACKAGES.rds':状态无法连接到服务器'
登录rstudio后,我尝试执行此处显示的所有命令: https://support.rstudio.com/hc/en-us/articles/226914208-Installing-packages-on-RStudio-Connect-from-behind-a-proxy
虽然我仍然得到同样的错误。如何设置我的代理才能安装软件包?
更新
尝试在rstudio中运行时出现以下错误:
library(httr)
set_config(use_proxy(url="my.proxy.url", port=XXX, username="my_user_name", password="my_password"))
set_config( config( ssl_verifypeer = 0L ) )
接下来安装:
install.packages("fpc", dependencies = TRUE)
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES.rds': status was 'Couldn't connect to server'
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES.gz': status was 'Couldn't connect to server'
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES': status was 'Couldn't connect to server'
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES.rds': status was 'Couldn't connect to server'
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES.gz': status was 'Couldn't connect to server'
Warning in install.packages :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES': status was 'Couldn't connect to server'
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘fpc’ is not available (for R version 3.4.0)
答案 0 :(得分:0)
您可以尝试这样的事情:
library(httr)
set_config(use_proxy(url="my.proxy.url", port=XXX, username="my_user_name", password="my_password"))
set_config( config( ssl_verifypeer = 0L ) )