RStudio安装package时出现错误

发布于 2022-09-04 10:39:47 字数 2026 浏览 26 评论 0

> install.packages("ggplot2")
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  InternetOpenUrl failed: ''
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 :
  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'
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  InternetOpenUrl failed: ''
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 :
  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'
Warning in install.packages :
  package ‘ggplot2’ is not available (for R version 3.3.2)
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  InternetOpenUrl failed: ''
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.3:
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/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/bin/windows/contrib/3.3:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.3/PACKAGES'
>

请问如何解决

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

许仙没带伞 2022-09-11 10:39:47

换国内源 因为默认源是国外的 gfw 你懂得

逆夏时光 2022-09-11 10:39:47

提示是打不开链接,你切换为国内的源试试
Rstudio设置如下
Tools>global options>packages
clipboard.png

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文