5

I'm trying to install a flowIncubator package from github (link to the package: https://github.com/RGLab/flowIncubator). I'm using R version 3.3.1 (2016-06-21). I've tried this code: devtools::install_github("RGLab/flowIncubator") & get this error:

  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")

I've tried to update both packages devtools & curl, I've tried to update R to an older version, I've tried to download the .zip file and install it through R studio & then load the package from the library. I've also tried directly putting the package file into the library. I've used functions install.packages(), but wasn't able install it.

luisgonzalez
  • 153
  • 11
Anara
  • 51
  • 1
  • 2
  • 4
  • 1
    Perhaps there is a firewall issue. I'm not sure, but you can always download the repository as a zip file, unzip it, and run `R CMD INSTALL` on it. – Yihui Xie Jul 11 '16 at 14:59
  • 1
    I'm having a similar issue on Ubuntu 16.04. What OS are you running R? As @Yihui said, a workaround is to manually install the package. If you're using R studio you can download the master zip, unzip it in the R working directory and issue `install("flowIncubator")`. It will recognize the folder as a package and install it properly. Besides all this, I'd **really** like to get to the bottom of this issue. – luisgonzalez Jul 31 '16 at 23:12

2 Answers2

1

I've found the problem. It seems that my DNS server is extremely slow and that is making the timeout problem.

Switching to an alternative DNS server like Google solved the issue.

luisgonzalez
  • 153
  • 11
0

One instance where this error occurs is when you're behind a firewall. One way to bypass this is to download and install the package manually.

# 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)
coip
  • 1,312
  • 16
  • 30