解决方案.有代理时如何安装_github [英] Solution. How to install_github when there is a proxy
本文介绍了解决方案.有代理时如何安装_github的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当您尝试从 GitHub 的存储库安装一些 R 包时
When you try to install some package of R from GitHub's repository
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 尝试通过代理访问 Internet.
This error is displayed because R is trying to access on Intenet through a proxy.
推荐答案
SOLUTION
步骤 1. 安装 devtools 包
Step 1. Install devtools packages
if (!require("devtools")) install.packages("devtools")
library(devtools)
第 2 步:为我们的代理设置配置(请更新您的信息代理)
Step 2. Set configuration for our proxy (Please update your information proxy)
library(httr)
set_config(
use_proxy(url="18.91.12.23", port=8080, username="user",password="password")
)
install_github('rWBclimate', 'ropensci')
这篇关于解决方案.有代理时如何安装_github的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文