如何将RCurl更新并卷曲到主机上的版本? [英] How to update RCurl and curl to the version on the host machine?

查看:36
本文介绍了如何将RCurl更新并卷曲到主机上的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初,我尝试使用 devtools :: install_github("EdwinTh/padr")出现以下错误:

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

curl :: new_handle()中的错误:libcurl中传入了一个未知选项

一段时间后,我发现 devtools 使用 curl/RCurl ,它将 curl 的当前版本包装在主机上.

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

curl 的主机(Ubuntu 14.04.5 LTS)计算机版本为:

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

1 $ curl -Vcurl 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

其中 curl 位于的位置:

12 $卷曲/usr/local/bin/curl

并且在直接从终端上使用 curl :: new_handle()时工作正常

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

相比之下, curl/RCurl 版本为:

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

$version
[1] "7.35.0"`

我假设这可能是潜在的问题.我现在的问题是如何让Rs curl/RCurl 指向相应的版本.

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.

我已经尝试了到目前为止在 R 主题上找到的所有内容,例如:

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

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

以及在主机上调整 curl :

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

但是我总是使用与 curl/RCurl 7.35.0相同的版本,而不是7.61.0.

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

赞赏任何见解!

推荐答案

我正在运行Ubuntu 18.04,但在尝试安装Tidyerse R软件包失败时遇到了相同的问题.作为依赖,它尝试安装curl 4.3,尽管我已经安装了curl 7.58.0-2ubuntu3.12.因此,只要R不意识到已经安装了现有的curl版本,更新操作系统就无济于事.

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.

为我解决了问题:sudo apt安装libcurl4-openssl-dev和sudo apt安装libssl-dev

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

这篇关于如何将RCurl更新并卷曲到主机上的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆