eguidotti / RblDataLicense

R Interface to Bloomberg Data License
http://rbldatalicense.eguidotti.com
GNU General Public License v3.0
14 stars 3 forks source link

Protocol "sftp" not supported #10

Open eguidotti opened 3 weeks ago

eguidotti commented 3 weeks ago

Some users have reported that running:

RblConnect(...)

may raise the error:

Error in function (type, msg, asError = TRUE) : Protocol "sftp" not supported

eguidotti commented 3 weeks ago

The issue is likely due to RCurl using a version of curl that was installed without sftp support.

To fix that, first set the path to point at a curl installation with sftp support (eg, install curl with openssl using homebrew on Mac).

PATH <- Sys.getenv("PATH")
version <- '8.4.0'
Sys.setenv(PATH = paste0("/opt/homebrew/Cellar/curl/", version, "/bin:", PATH))

Then, install RCurl from source

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

and check that the sftp protocol is supported.

RCurl::curlVersion()

$age [1] 10 $version [1] "8.4.0" $vesion_num [1] 525312 $host [1] "aarch64-apple-darwin21.6.0" $features ipv6 ssl libz ntlm asynchdns spnego largefile idn tlsauth_srp 1 4 8 16 128 256 512 1024 16384 $ssl_version [1] "SecureTransport (OpenSSL/3.1.4)" $ssl_version_num [1] 0 $libz_version [1] "1.2.12" $protocols [1] "dict" "file" "ftp" "ftps" "gopher" "gophers" "http" "https"
[9] "imap" "imaps" "ldap" "ldaps" "mqtt" "pop3" "pop3s" "rtmp"
[17] "rtmpe" "rtmps" "rtmpt" "rtmpte" "rtmpts" "rtsp" "scp" "sftp"
[25] "smb" "smbs" "smtp" "smtps" "telnet" "tftp"
$ares [1] "" $ares_num [1] 0 $libidn [1] "2.3.4"

For more info, see here