Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_github fails when using devtools 1.12.0 on R 3.1 #1244

Closed
leonidb opened this issue Jun 28, 2016 · 5 comments
Closed

install_github fails when using devtools 1.12.0 on R 3.1 #1244

leonidb opened this issue Jun 28, 2016 · 5 comments
Labels

Comments

@leonidb
Copy link

@leonidb leonidb commented Jun 28, 2016

According to 1.12.0 description, R >= 3.0.2 is supported, however, when using devtools with R 3.1

devtools::install_github("...")

We get the following error:

    Downloading GitHub repo ...
    from URL ...
    Installing ...
    Error in if (capabilities("libcurl")) { : argument is of length zero
    Calls: <Anonymous> ... download_method_secure -> download_method -> auto_download_method

The check if (capabilities("libcurl")) was added in eed0746, which is part of 1.12.0 release.

When I execute capabilities(), libcurl indeed doesn't appear on the list, although
libcurl library is installed on the machine.

With devtools 1.11.1 the same command works.

@crarlus
Copy link

@crarlus crarlus commented Jun 29, 2016

I can confirm this issue for R 3.1.

Error in if (capabilities("libcurl")) { : argument is of length zero

Apparently this arises in older versions of R.

In R 3.3

help("capabilities") 

states

libcurl 
is libcurl available in this build? Used by function curlGetHeaders and optionally by download.file and url. As from R 3.3.0 always true for Unix-alikes, and true for CRAN Windows builds.

The entry for libcurl is missing in older versions of R.

Furthermore, in https://cran.r-project.org/doc/manuals/r-release/NEWS.html it was announced

CHANGES IN R 3.2.0
    ...
    capabilities("libcurl") reports if this is available.

Hence, in file download-method.R one needs to check if the entry for "libcurl" exists at all, e.g.

any(names(capabilities()) == "libcurl")
@damesek
Copy link

@damesek damesek commented Nov 7, 2016

These lines solved this problem at my case:

sudo apt-get install libcurl4-openssl-dev libxml2-dev libxslt-dev libssl-dev -y
sudo apt-get install r-base r-base-dev -y

(ubuntu 14.04)

@vext01
Copy link

@vext01 vext01 commented Feb 22, 2017

The workaround I used is:
> options(download.file.method = "wget")

jdblischak added a commit to jdblischak/workflowr that referenced this issue Feb 27, 2017
oldrel - 3.2.5
release - 3.3.0
devel - development version

Not easy to test older versions because of devtools difficulties.

https://docs.travis-ci.com/user/languages/r
r-lib/devtools#1244
@hadley hadley added the install label Aug 2, 2017
@hadley
Copy link
Member

@hadley hadley commented Aug 2, 2017

We'll be adding automated tests to ensure the devtools works with R 3.1.0 very shortly. We'll see if it's possible to push back to R 3.0.3.

@hadley hadley closed this Aug 2, 2017
@lock
Copy link

@lock lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants