RStudio安装工具包失败(install.packages)

  • Post author:
  • Post category:其他


出错信息:

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,重新运行install.packages()语句即可



版权声明:本文为qq_41547659原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。