我最近在个人电脑(windows 8)上安装了R Studio(版本0.99.892),并尝试安装以下软件包:
ggplot2;
dplyr;
rmarkdown;
tidyr。
无论是R还是R Studio都不能安装这些软件包。每次我尝试安装一个软件包,我都会收到我在本文底部包含的警告信息。
我已经使用了install.packages命令以及内置的软件包安装工具。我尝试过几个不同的镜像。
我曾经尝试公共大学的网络来源,我的私人网络来源和手机热点。我尝试通过VPN连接。我已将R Studio添加到我的Windows防火墙例外列表中,并完全禁用了Windows防火墙。我没有运行其他防火墙。
我切换了全局选项中“软件包”选项卡中的各种连接选项。
我可以在浏览器中访问这些URL。
下面是来自R Studio的警告:
以下是来自R(3.2.3)的警告信息:
无论是R还是R Studio都不能安装这些软件包。每次我尝试安装一个软件包,我都会收到我在本文底部包含的警告信息。
我已经使用了install.packages命令以及内置的软件包安装工具。我尝试过几个不同的镜像。
我曾经尝试公共大学的网络来源,我的私人网络来源和手机热点。我尝试通过VPN连接。我已将R Studio添加到我的Windows防火墙例外列表中,并完全禁用了Windows防火墙。我没有运行其他防火墙。
我切换了全局选项中“软件包”选项卡中的各种连接选项。
我可以在浏览器中访问这些URL。
下面是来自R Studio的警告:
> install.packages("devtools")
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/src/contrib:
cannot open URL 'https://cran.fhcrc.org/src/contrib/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
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'
Installing package into ‘C:/Users/Nikhailovich/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/src/contrib:
cannot open URL 'https://cran.fhcrc.org/src/contrib/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
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 ‘devtools’ is not available (for R version 3.2.3)
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/bin/windows/contrib/3.2:
cannot open URL 'https://cran.fhcrc.org/bin/windows/contrib/3.2/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2/PACKAGES'
以下是来自R(3.2.3)的警告信息:
> install.packages("ggplot2")
Installing package into ‘C:/Users/Nikhailovich/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning: unable to access index for repository https://dirichlet.mat.puc.cl/src/contrib:
cannot open URL 'https://dirichlet.mat.puc.cl/src/contrib/PACKAGES'
Warning: 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: unable to access index for repository https://dirichlet.mat.puc.cl/bin/windows/contrib/3.2:
cannot open URL 'https://dirichlet.mat.puc.cl/bin/windows/contrib/3.2/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2/PACKAGES'
Warning message:
package ‘ggplot2’ is not available (for R version 3.2.3)
有几篇关于在R和R Studio中安装软件包的StackExchange文章,但我没有找到任何能够回答我的特殊情况的文章。提前感谢任何知道情况的人。