analytics-josh
analytics-josh

Reputation: 135

having trouble getting devtools::install_github() to work in R on Win 7 64bit machine

each time I try to run install_github() from RStudio I get something like this:

devtools::install_github("r-lib/devtools")
Downloading GitHub repo r-lib/devtools@master
Error in utils::download.file(url, path, method = download_method(), quiet = quiet,  : 
  cannot open URL 'https://api.github.com/repos/r-lib/devtools/tarball/master'*

I tried the work around described in https://github.com/r-lib/devtools/issues/1772

and this is what I get:

assignInNamespace("version_info", c(devtools::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
Error in bindingIsLocked(x, ns) : no binding for "version_info"
find_rtools() # is TRUE now
Error in find_rtools() : could not find function "find_rtools"*

Please suggest a workaround to get devtools::install_github() to work on my Win PC.

Upvotes: 3

Views: 7286

Answers (4)

Bodhayan Prasad
Bodhayan Prasad

Reputation: 1

use of library(devtools) firsts, followed by install_github("<pkg_name>") works instead of using 1-line command using scope resolution operator (::)

Upvotes: -1

upuil
upuil

Reputation: 85

It works for me. options(download.file.method = "libcurl")

Upvotes: 3

omdit
omdit

Reputation: 121

for me this worked on Windows 10

options(download.file.method = "wininet")

https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

Upvotes: 5

analytics-josh
analytics-josh

Reputation: 135

I believe I have found a solution for this Win 7 64 bit machine which was based on: https://github.com/r-lib/remotes/issues/130

Click Start > type in "Internet Options" > click "Internet options" > Go to "Advanced" and check TLS 1.2 box.

Upvotes: 7

Related Questions