> install.packages("maps") Warning in install.packages : unable to access index for repository https://mirrors.ustc.edu.cn/CRAN/bin/windows/contrib/3.5: cannot open URL 'https://mirrors.ustc.edu.cn/CRAN/bin/windows/contrib/3.5/PACKAGES' Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘maps’ These will not be installed
时间: 2023-08-09 16:11:51 浏览: 392
解决git:fatal:Unable to create”…/.git/index.lock” 的错误
这个警告提示是因为无法访问指定的CRAN镜像源,导致无法下载并安装`maps`包。一种解决方法是更换镜像源,可以尝试执行以下命令:
```R
options(repos = c(CRAN = "https://cran.r-project.org/"))
```
该命令将镜像源更改为CRAN官方源,然后再执行`install.packages("maps")`试试看。如果还是无法安装,那可能是由于`maps`包只提供源码,需要进行编译,你可以安装Rtools软件并确保Rtools的路径已经添加到环境变量中,然后再安装`maps`包。
阅读全文