【发布时间】: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