我刚刚下载了最新版本的 R 和 Rstudio,当我尝试使用 install.packages 命令或“软件包”选项卡中的安装提示安装任何软件包时,出现错误。
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: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/levyde/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
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 ‘dplyr’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.3:
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/PACKAGES'
我在使用以前版本的 Rstudio 时从未遇到过问题,并且在 Rstudio 论坛中找不到任何帮助。有人有任何建议来解决这个问题吗?
有时候事情总会有自己解决的办法。我确认我已安装所有正确的版本并指向正确的存储库。今天,突然间,当尝试 install.packages() 命令时,一切正常。不知道问题是什么,但我现在可以安装库包了。