使用 install_github 时出错 |开发工具 |超时问题
Error while using install_github | devtools | timeout issue
当我尝试使用 devtools 从 git-hub 下载并安装软件包时,我遇到了这个问题。
R 版本:3.1.3(64 位)
> install_github("hadley/httr")
Downloading github repo hadley/httr@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
> traceback()
13: .Call(R_curl_fetch_memory, url, handle)
12: curl::curl_fetch_memory(url, handle = handle)
11: request_fetch.write_memory(req$output, req$url, handle)
10: request_fetch(req$output, req$url, handle)
9: request_perform(req, hu$handle$handle)
8: httr::HEAD(src_submodules, , auth)
7: github_has_remotes(x, auth)
6: remote_download.github_remote(remote, quiet = quiet)
5: remote_download(remote, quiet = quiet)
4: FUN(X[[1L]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
2: install_remotes(remotes, ...)
1: install_github("hadley/httr")
编辑:
我正在使用带有 Rstudio 客户端的 Revolution R Enterprise 7.4。
问题已解决。当我在 install_github 命令之前设置此选项时,问题已解决。
> options(download.file.method = "wininet")
> library("devtools")
> install_github("ropensci/plotly")
Downloading github repo ropensci/plotly@master
Installing plotly
Skipping 4 packages not available: ggplot2, knitr, RCurl, RJSONIO
"C:/PROGRA~1/R/R-31~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/310189051/AppData/Local/Temp/RtmpQNg1ji/devtools3e1c750f67e4/ropensci-plotly-6ff8831" --library="C:/Program \
Files/R/R-3.1.3/library" --install-tests
* installing *source* package 'plotly' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'RevoScaleR', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Program Files/R/R-3.1.3/library/RevoScaleR/rxLibs/x64/RxLink.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
*** arch - x64
* DONE (plotly)
> library(plotly)
Loading required package: RCurl
Loading required package: bitops
Loading required package: RJSONIO
Loading required package: ggplot2
以下是对我有用的方法:
library(httr)
with_config(use_proxy(...), install_github(...))
或
library(httr)
set_config(use_proxy(url = "******", port = ****))
devtools::install_github("username/packagename")
当我尝试使用 devtools 从 git-hub 下载并安装软件包时,我遇到了这个问题。
R 版本:3.1.3(64 位)
> install_github("hadley/httr")
Downloading github repo hadley/httr@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
> traceback()
13: .Call(R_curl_fetch_memory, url, handle)
12: curl::curl_fetch_memory(url, handle = handle)
11: request_fetch.write_memory(req$output, req$url, handle)
10: request_fetch(req$output, req$url, handle)
9: request_perform(req, hu$handle$handle)
8: httr::HEAD(src_submodules, , auth)
7: github_has_remotes(x, auth)
6: remote_download.github_remote(remote, quiet = quiet)
5: remote_download(remote, quiet = quiet)
4: FUN(X[[1L]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
2: install_remotes(remotes, ...)
1: install_github("hadley/httr")
编辑:
我正在使用带有 Rstudio 客户端的 Revolution R Enterprise 7.4。
问题已解决。当我在 install_github 命令之前设置此选项时,问题已解决。
> options(download.file.method = "wininet")
> library("devtools")
> install_github("ropensci/plotly")
Downloading github repo ropensci/plotly@master
Installing plotly
Skipping 4 packages not available: ggplot2, knitr, RCurl, RJSONIO
"C:/PROGRA~1/R/R-31~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/310189051/AppData/Local/Temp/RtmpQNg1ji/devtools3e1c750f67e4/ropensci-plotly-6ff8831" --library="C:/Program \
Files/R/R-3.1.3/library" --install-tests
* installing *source* package 'plotly' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'RevoScaleR', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Program Files/R/R-3.1.3/library/RevoScaleR/rxLibs/x64/RxLink.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
*** arch - x64
* DONE (plotly)
> library(plotly)
Loading required package: RCurl
Loading required package: bitops
Loading required package: RJSONIO
Loading required package: ggplot2
以下是对我有用的方法:
library(httr)
with_config(use_proxy(...), install_github(...))
或
library(httr)
set_config(use_proxy(url = "******", port = ****))
devtools::install_github("username/packagename")