暂无说说

R语言install.packages失败解决方式

R jiajun 1年前 (2019-06-17) 573次浏览 0个评论 扫描二维码

失败信息

Warning in install.packages :

  InternetOpenUrl failed: ''
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  unable to access index for repository https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib:
  cannot open URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/PACKAGES'
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'

解决方法

进入到 R 的安装目录,编辑/etc/Rprofile.site

添加 options(download.file.method="libcurl"),重新打开 Rstudio 即可

喜欢 (1)

您必须 登录 才能发表评论!