【问题标题】:How to update libcurl version used by R on Ubuntu 18.04如何在 Ubuntu 18.04 上更新 R 使用的 libcurl 版本
【发布时间】:2021-03-01 12:22:48
【问题描述】:

由于我必须使用sftp 协议从远程服务器检索一些文档,我重新安装了带有 ssl 的curl 库。

curl --version 现在可以正确返回

curl 7.72.0 (x86_64-pc-linux-gnu) libcurl / 7.72.0 OpenSSL / 1.1.1 zlib / 1.2.11 brotli / 1.0.4 libidn2 / 2.0.4 libpsl / 0.19.1 (+ libidn2 / 2.0.4 ) libssh / 0.7.0 / openssl / zlib nghttp2 / 1.30.0 librtmp / 2.3
Release-Date: 2020-08-19
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

现在启用了sftp 协议。

R 中,我尝试使用install.package('RCurl', type = 'source') 从源代码重新安装RCurl 包,但libcurlVersion() 命令不断返回

[1] "7.58.0"
attr (, "ssl_version")
[1] "OpenSSL / 1.1.1"
attr (, "libssh_version")
[1] ""
attr (, "protocols")
 [1] "dict" "file" "ftp" "ftps" "gopher" "http" "https" "imap"
 [9] "imaps" "ldap" "ldaps" "pop3" "pop3s" "rtmp" "rtsp" "smb"
[17] "smbs" "smtp" "smtps" "telnet" "tftp"

如你所见,库版本与机器上安装的不同,sftp 协议未启用。

如何强制R 使用正确的curl 版本?

【问题讨论】:

  • 有时在安装之前删除旧包可修复此类问题。 remove.packages("RCurl") 然后重新安装。
  • @csgroen 不幸的是,删除旧包并不能解决问题。

标签: r curl ubuntu-18.04 rcurl


【解决方案1】:

您需要重新安装旧版 curl 才能解决此问题。你可以指定你想要的curl版本,指南通过源代码构建curl 示例:

wget https://curl.haxx.se/download/curl-7.58.0.zip

通过 zip 重新安装 curl 的指南

https://yannmjl.medium.com/how-to-manually-update-curl-on-ubuntu-server-899476062ad6

【讨论】:

  • 你可以指定你想要的curl版本,指南通过源代码构建curl示例:wget curl.haxx.se/download/curl-7.58.0.zip
  • 这不是关于安装旧版本的 curl。重点是强制 R 使用机器上安装的 curl 的实际版本。
猜你喜欢
  • 2023-02-21
  • 2018-03-07
  • 1970-01-01
  • 2020-11-11
  • 2021-07-20
  • 1970-01-01
  • 1970-01-01
  • 2020-05-25
  • 1970-01-01
相关资源
最近更新 更多