7

Initially I was trying to use devtools::install_github("EdwinTh/padr") where I got the following error:

Error in curl::new_handle() : An unknown option was passed in to libcurl

After some time I found out that devtools uses curl/RCurl which wraps the current version of curlon the host machine.

The host(Ubuntu 14.04.5 LTS) machine version of curl is:

1$ curl -V curl 7.61.0 (x86_64-pc-linux-gnu) libcurl/7.61.0 OpenSSL/1.0.1f zlib/1.2.8 libssh2/1.8.0 librtmp/2.3

where curlis located in:

12$ which curl /usr/local/bin/curl

and is working fine when using curl::new_handle()directly from the terminal

In comparison the curl/RCurl version is:

> RCurl::curlVersion()
$age
[1] 3

$version
[1] "7.35.0"`

I'm assuming that this might be the underlying issue. My problem now is how to let Rs curl/RCurl point to the corresponding version.

I have tried everything I found so far on that topic for R like:

install.packages("RCurl", type="source") and install.packages("curl", type="source")

as well as adjusting curlon the host machine:

wget https://libssh2.org/download/libssh2-1.8.0.tar.gz
tar zxvf llibssh2-1.8.0.tar.gz
cd libssh2-1.8.0
./configure
make
sudo make install 

wget http://curl.haxx.se/download/curl-7.61.0.tar.gz
tar zxvf curl-7.61.0.tar.bz2
cd curl-7.61.0
./configure --with-libssh2=/usr/local
make
sudo make install

But I always get the same version for curl/RCurl 7.35.0 instead of 7.61.0.

Appreciate any insights!

Mamba
  • 1,183
  • 2
  • 13
  • 33
  • For starters, you could consider not being on a four-year old release of your distro. With Ubuntu 18.04 you have no such problem. But in short: update the `libcurl*-dev` package (complications: there are several) and the reinstall `RCurl` and/or `curl`. – Dirk Eddelbuettel Jul 28 '18 at 18:21
  • Hi @DirkEddelbuettel there are some restrictions hindering to upgrade Ubuntu. But anyway, thanks for taking time to give your opinion. `libcurl*-dev` was already installed. So basically I removed it and reinstalled `sudo apt-get install libcurl4-openssl-dev` as well as those two packages without any change in the behaviour. – Mamba Jul 28 '18 at 18:33
  • If you tell Ubuntu to install from 14.04 it will of _install the same package over and over_. That is what sticking with a release means. Your problem, in essence, is to figure out where to get a newer curl library _built for that release_ from. And/or how to tell the R packages how to prefer the local one. – Dirk Eddelbuettel Jul 28 '18 at 19:00
  • Hmm, I just assumed it is related somehow to the Path for curl /usr/bin/curl vs. /user/local/bin/curl. I thought RCurl or curl in R are referring to /usr/bin/curl. However on `echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:` the `/usr/local/bin`comes before `/usr/bin` where I have installed the newest curl 7.61.0. running with out errors. – Mamba Jul 28 '18 at 19:07
  • The binary is not used to build the R package. – Dirk Eddelbuettel Jul 28 '18 at 19:07
  • 1
    was this ever resolved? same situation, but i've also downloaded the RCurl source, extracted, run ./configure, built and installed and still no good – Glenn Sampson Nov 29 '18 at 06:27
  • So the only way is to update the OS version and update curl? – KarthikS Mar 26 '20 at 02:17

1 Answers1

0

I'm running Ubuntu 18.04, and ran into the same problem when I tried and failed to install the Tidyerse R package. As a dependency it tried to install curl 4.3 although I have already curl 7.58.0-2ubuntu3.12 installed. So to update the OS wouldn't help as long as R doesn't realize there is already an existing curl version installed.

Solved it for me: sudo apt install libcurl4-openssl-dev and sudo apt install libssl-dev

axt
  • 1
  • 1