StatsWithR / statsr

Companion package for the Coursera Statistics with R specialization
Other
69 stars 83 forks source link

Unable to install via install_github #6

Closed luiandresgonzalez closed 7 years ago

luiandresgonzalez commented 8 years ago

I'm in Ubuntu 16.04, running R

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          2.3                         
year           2015                        
month          12                          
day            10                          
svn rev        69752                       
language       R                           
version.string R version 3.2.3 (2015-12-10)
nickname       Wooden Christmas-Tree 

All packages and dependencies are up to date (includes devtools and Rcurl, curl, httr). When trying to use install_github to install any package, I get the following:

Error in curl::curl_fetch_memory(url, 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: install_github("StatsWithR/statsr")

rundel commented 8 years ago

This looks like it is an issue with the curl package (in R) or the curl library in Ubuntu. I was able to install the package from github via devtools this afternoon without issue on my own Ubuntu 16.04 box.

Try reinstalling curl from source first, then httr, and finally devtools and see if any of those steps clear things up.

luiandresgonzalez commented 8 years ago

I've done several things at the same time and now it works, but now I cannot pinpoint which was the problem. One of the things was to mannually updater-base (somehow I wasn't receiving update warnings in the Software Updater). Also, I downloaded this package master zip file and installed it from there. At first some dependencies weren't met ("shiny", "broom", "cubature"). After that, the package worked perfectly.

I've tried your instructions but the problem with the curl timeout persisted (here is the R terminal complete output: http://pastebin.com/TKvmLVE4). I've read somewhere that there is some problem with something called a binding, which I don't know what it is.

luiandresgonzalez commented 7 years ago

@rundel , I finnally solved it. It was due to an extremely slow DNS server. Changing it manually to google's (8.8.8.8) solved the issue.

Thank you.