gpt4 book ai didi

R - 无法访问包安装的 url

转载 作者:行者123 更新时间:2023-12-04 09:23:32 25 4
gpt4 key购买 nike

我最近在个人计算机(Windows 8)上安装了 R Studio(版本 0.99.892),并尝试安装以下软件包:
ggplot2;
dplyr;
Markdown ;
蒂迪尔。

R 和 R Studio 都不能安装任何这些包。每次我尝试安装软件包时,都会收到我在这篇文章底部包含的一组警告。

我使用了 install.packages 命令以及内置的包安装工具。我尝试了几种不同的镜子。

我尝试过公立大学互联网资源、我自己的私有(private)互联网资源和电话线。我尝试通过 VPN 连接。我已将 R Studio 添加到我的 Windows 防火墙异常(exception)列表中,并且还完全禁用了 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 帖子,但我找不到任何可以回答我的特殊情况的帖子。提前感谢任何知道发生了什么的人

最佳答案

我想补充一点,我遇到了这个问题,但修复不是在 R 中,而是在我们的系统中。我们的 IT 人员说:由于某种未知原因,DNS 解析器服务无法解析主机名。我已经重新启动了 resolvd 服务。服务器现在可以解析主机名。
他的错误是:名称解析暂时失败

关于R - 无法访问包安装的 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35931342/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com