首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法从github安装R-package

无法从github安装R-package
EN

Stack Overflow用户
提问于 2016-07-08 18:03:23
回答 2查看 2.9K关注 0票数 5

我正在尝试从github安装一个flowIncubator包(包的链接:https://github.com/RGLab/flowIncubator)。我使用的是R版本3.3.1 (2016-06-21)。我已经尝试过这段代码:devtools::install_github("RGLab/flowIncubator") &得到这个错误:

代码语言:javascript
复制
  Error in curl::curl_fetch_disk(url, x$path, handle = handle) : 
      Timeout was reached
    > traceback()
    12: .Call(R_curl_fetch_disk, url, handle, path, "wb", nonblocking)
    11: curl::curl_fetch_disk(url, x$path, handle = handle)
    10: request_fetch.write_disk(req$output, req$url, handle)
    9: request_fetch(req$output, req$url, handle)
    8: request_perform(req, hu$handle$handle)
    7: httr::GET(url, path = path, httr::write_disk(path = tmp))
    6: remote_package_name.github_remote(remote)
    5: remote_package_name(remote)
    4: FUN(X[[i]], ...)
    3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
    2: install_remotes(remotes, quiet = quiet, ...)
    1: devtools::install_github("RGLab/flowIncubator")

我已经尝试更新了devtools和curl这两个包,我已经尝试将R更新到一个较旧的版本,我已经尝试下载.zip文件并通过R studio安装它,然后从库中加载该包。我还尝试将包文件直接放入库中。我使用过函数install.packages(),但无法安装它。

EN

回答 2

Stack Overflow用户

发布于 2016-08-17 23:08:58

我找到了问题所在。看起来我的DNS服务器非常慢,这就造成了超时问题。

换成Google这样的DNS服务器解决了这个问题。

票数 1
EN

Stack Overflow用户

发布于 2017-04-15 01:37:53

发生此错误的一个实例是当您处于防火墙之后时。绕过这一点的一种方法是手动下载并安装软件包。

代码语言:javascript
复制
# 1. Find the location where R saves installed packages:
libpath <- .libPaths()

# 2. On the Github webpage of the package you want to install, 
## in the top right corner click on "Clone or download", 
## then click "Download ZIP", save it, unzip it, 
## and place it in the `libpath` directory identified in the previous step.

# 3. In R, set the working directory to `libpath`
setwd(libpath[1])

#4. Install and load the package manually using the `install()` function of 
#   the `devtools` package:
install("flowIncubator")
library(flowIncubator)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38263920

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档