Error While Using Install_Github | Devtools | Timeout Issue

Error while using install_github | devtools | timeout issue

The issue is resolved. The issue was resolved when I set this option prior to install_github command.

> 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

R install my own upload package from github with Timeout:curl_fetch_disk Error

I think there is a typo in your devtools command. This works:

> devtools::install_github("yuanqingye/FlightR")
Downloading GitHub repo yuanqingye/FlightR@master
✔ checking for file ‘/tmp/RtmplBMbiz/remotes2c88780eef71/yuanqingye-FlightR-135a628/DESCRIPTION’ ...
─ preparing ‘FlightR’:
✔ checking DESCRIPTION meta-information ...

─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘FlightR_1.0.tar.gz’
Installing package into ‘/home/johannes/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘FlightR’ ...
** R
** byte-compile and prepare package for lazy loading
** help
No man pages found in package ‘FlightR’
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (FlightR)

Install with devtools::install_github() fails to detect build tools

Looks like there are a few issues that you need to overcome to install this package (xcode command line tools and OpenMP support for a start), but you should overcome them if you follow the instructions here: https://stackoverflow.com/a/65334247/12957340

After making the necessary changes, I successfully installed gsynth on my system (macOS Big Sur 11.2.3 / R version 4.0.3) using devtools::install_github('xuyiqing/gsynth') without issue.

--

Here are the instructions in case the link above dies:

  1. Reinstall xcode command line tools (even if it says "up to date")
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

  1. Install gcc & llvm via Homebrew (instructions for installing Homebrew) or, if you already have gcc/llvm installed via Homebrew, skip to the next step
# This can take several hours
brew install gcc
brew install llvm

  1. Once you have gcc & llvm installed via Homebrew:
brew cleanup
brew update
brew upgrade
brew reinstall gcc
brew reinstall llvm

  1. Link some headers into /usr/local/include
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/

# You can safely ignore warnings like this:
#ln: /usr/local/include//tcl.h: File exists
#ln: /usr/local/include//tclDecls.h: File exists
#ln: /usr/local/include//tclPlatDecls.h: File exists
#ln: /usr/local/include//tclTomMath.h: File exists
#ln: /usr/local/include//tclTomMathDecls.h: File exists
#ln: /usr/local/include//tk.h: File exists
#ln: /usr/local/include//tkDecls.h: File exists
#ln: /usr/local/include//tkPlatDecls.h: File exists

  1. Create a new ~/.R/Makevars file (if you already have a ~/.R/Makevars file, save it in a different directory (away from ~/.R/)) and include only these lines in the file:
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++

LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include

  1. Compile a package from source in R/Rstudio
# To check whether openmp is enabled, compile data.table:
install.packages("data.table", type = "source")

  1. If your package fails to compile, a couple of SO users have had to install a fresh gfortran (re: https://stackoverflow.com/a/65334247/12957340), which you can download from https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/10.2-bigsur-intel

unable to install R github packages with devtools (curl Timeout error)

(This won't solve your problem so it technically isn't an answer but it's also too long for a comment…SO pedants can feel free to downvote)

While SO is not an internet connection tech support forum, we can give you some R tools to triage your connection.

I know have the curl package installed since you are trying to use devtools so give this a go:

do.call(
rbind.data.frame,
lapply(
c(
"github.com", "stackoverflow.com", "google.com", "yahoo.com",
"www.this-wont-resolve.com", "cisco.com", "bankofamerica.com",
"apple.com", "microsoft.com", "curl.haxx.se"
),
function(x) {
clock <- system.time(res <- try(curl::nslookup(x), silent = TRUE), gcFirst = FALSE)
clock <- as.list(clock)
clock <- c(host = x, clock, result = if (inherits(res, "character")) res else "Error")
clock
}
)
)

On my system ^^ produces:

##                         host user.self sys.self elapsed user.child sys.child          result
## 2 github.com 0.000 0.000 0.001 0 0 192.30.253.113
## 21 stackoverflow.com 0.001 0.000 0.001 0 0 151.101.65.69
## 3 google.com 0.000 0.000 0.001 0 0 172.217.10.142
## 4 yahoo.com 0.000 0.001 0.001 0 0 72.30.35.9
## 5 www.this-wont-resolve.com 0.071 0.002 0.073 0 0 Error
## 6 cisco.com 0.000 0.000 0.001 0 0 72.163.4.185
## 7 bankofamerica.com 0.001 0.000 0.000 0 0 171.159.228.150
## 8 apple.com 0.000 0.001 0.001 0 0 17.142.160.59
## 9 microsoft.com 0.001 0.000 0.001 0 0 40.113.200.201
## 10 curl.haxx.se 0.000 0.000 0.001 0 0 151.101.118.49

What it is doing is using your operating system's resolver libraries to make DNS lookups the way curl does (and hence httr/rvest and the devtools network-based installers). You can get timings and also see if there are errors. There is a deliberate host that doesn't resolve in the provided list. Feel free to add more.

That should give you an idea of whether there are issues with resolving in general.

If you have pingr installed, you can do:

t(sapply(
c(
"github.com", "stackoverflow.com", "google.com",
"yahoo.com", "cisco.com", "time.apple.com"
),
function(x) {
res <- try(pingr::ping(destination = x, count = 3, timeout = 5))
}
))

which, on my system, returns:

##                      [,1]   [,2]   [,3]
## github.com 30.095 23.964 31.652
## stackoverflow.com 16.524 13.529 20.790
## google.com 30.743 22.004 22.333
## yahoo.com 34.450 33.070 40.198
## cisco.com 67.215 74.290 96.568
## time.apple.com 110.832 88.482 87.582

That should give you a basic idea of how well basic network ops to the internet are going. Super high values are bad.

If you have speedtest installed, you can do:

speedtest::spd_test()

from an R console or:

Rscript -e 'speedtest::spd_test()'

from a command-line/terminal prompt and it'll give you output like:

## Gathering test configuration information...
## Gathering server list...
## Determining best server...
## Initiating test from Comcast Cable (###.###.###.###) to Otelco (Portland, ME)
##
## Analyzing download speed..........
## Download: 166 Mbit/s
##
## Analyzing upload speed......
## Upload: 7 Mbit/s

(yes, we have horribad internet in rural Maine)

I can post some more troubleshooting info later. Knowing what OS you use would be helpful.

NOTE: that some of the behvaviour you're describing is indicative of numerous malware strains that hijack DNS on systems (which is another reason I'm trying to help).

R Unable to Install Packages From GitHub (System Error 267 @win/processx.c:1040)

The standalone mode of the remotes package solved the issue for me,
as suggested by the maintainer of processx (Gábor Csárdi) here

devtools::install_github() only calls remotes::install_github().

However, for the remotes, there is the option to be exectued in standalone mode

Source: Cran

Standalone mode

remotes will use the curl, git2r and pkgbuild packages if they are
installed to provide faster implementations for some aspects of the
install process. However if you are using remotes to install or update
these packages (or their reverse dependencies) using them during
installation may fail (particularly on Windows).

If you set the environment variable R_REMOTES_STANDALONE="true" (e.g.
in R Sys.setenv(R_REMOTES_STANDALONE="true")) you can force remotes to
operate in standalone mode and use only its internal R
implementations. This will allow successful installation of these
packages

With the following lines of code, gt was finally successfull installed from github.

Sys.setenv(R_REMOTES_STANDALONE="true")
remotes::install_github("rstudio/gt")

Thanks all the commentators for your help!

Update October / 2021

To avoid having to do these steps (Set in standanlone mode, and install with remotes) over and over again everytime you want to install a new package from github another convenient workaround is to just rollback to the previous version of processx as adviced by @rempsy in the github issue:

install.packages("pacman")
pacman::p_del(processx)
# Installing previous verison 3.5.1
install.packages("https://cran.r-project.org/src/contrib/Archive/processx/processx_3.5.1.tar.gz", repos=NULL, type="source")

After the rollback of processx to version 3.5.1, devtools::install_github() works as expected, e.g.

devtools::install_github("rstudio/gt")


Related Topics



Leave a reply



Submit