当您尝试从GitHub的存储库安装一些R包时
install_github('rWBclimate', 'ropensci')如果出现以下错误:
Installing github repo(s) rWBclimate/master from ropensci
Downloading rWBclimate.zip from https://github.com/ropensci/rWBclimate/archive/master.zip
Error in function (type, msg, asError = TRUE) :
Could not resolve host: github.com; Host not found, try again显示此错误是因为R正在尝试通过代理访问Intenet。
发布于 2013-07-23 03:08:10
解决方案
步骤1.安装devtools包
if (!require("devtools")) install.packages("devtools")
library(devtools)步骤2.为我们的代理设置配置(请更新您的信息代理)
library(httr)
set_config(
use_proxy(url="18.91.12.23", port=8080, username="user",password="password")
)
install_github('rWBclimate', 'ropensci')发布于 2019-12-06 20:36:11
如果设置代理配置不起作用(就像我的情况一样),可以从github下载包到本地机器:

解压缩该文件夹,并从本地计算机安装:
devtools::install("C:/path/to/folder/ggbiplot-master")https://stackoverflow.com/questions/17783686
复制相似问题