无法在R中安装软件包-无法访问存储库

时间:2018-09-14 10:30:51

标签: r

当我尝试在R中安装软件包时,出现以下错误:

    > install.packages("swirl")
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/src/contrib:
  cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
Installing package into ‘D:/Dokumente/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/src/contrib:
  cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘swirl’ is not available (for R version 3.5.1)
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.5:
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.5/PACKAGES'

我在Windows 10上运行R Studio 1.1.456。显然,即使我已关闭Windows防火墙并卸载了所有防病毒软件,R也无法访问Internet。我已经重新安装了R和RStudio并以管理员模式运行它们。更改存储库或直接通过R GUI安装也无济于事。唯一的方法是手动将程序包下载为zip文件并从那里安装-我很想解决这个错误,因为为每个程序包安装所有依赖项都花费了很长时间。

我非常感谢任何想法!

0 个答案:

没有答案