今天安装r语言devtools包,尝试很多种方法也不能决解,下面这个问题是改变镜像,然后就会可以安装了(3.4.2版本)
Warning in install.packages : InternetOpenUrl failed: '无法解析服务器的名称或地址' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : unable to access index for repository https://mirrors.eliteu.cn/CRAN/src/contrib: cannot open URL 'https://mirrors.eliteu.cn/CRAN/src/contrib/PACKAGES' Warning in install.packages : cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : unable to access index for repository https://mirrors.eliteu.cn/CRAN/src/contrib: cannot open URL 'https://mirrors.eliteu.cn/CRAN/src/contrib/PACKAGES' Warning in install.packages : package ‘devtools' is not available (for R version 3.4.2) Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : InternetOpenUrl failed: '不能连接到吊销服务器,或者未能获得最终响应。' Warning in install.packages : unable to access index for repository https://mirrors.eliteu.cn/CRAN/bin/windows/contrib/3.4: cannot open URL 'https://mirrors.eliteu.cn/CRAN/bin/windows/contrib/3.4/PACKAGES' Warning in install.packages : cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found'
补充:R语言:解决 devtools::install_github 的 SSL/TLS connection failed 问题
问题描述:
解决方法:
1. 打开Git Bash 窗口
2.输入以下代码:
git config --global http.sslBackend "opensel"
这里D:/R/R-4.0.2/library/openssl/cacert.pem是R语言安装位置中的cacert.pem 路径
git config --global http.sslCAInfo D:/R/R-4.0.2/library/openssl/cacert.pem
结果如下:
重新运行R
成功从git中下载R的包,运行成功
以上为个人经验,希望能给大家一个参考,也希望大家多多支持服务器之家。如有错误或未考虑完全的地方,望不吝赐教。
原文链接:https://blog.csdn.net/zxy_clover/article/details/78305545