我已经安装了 curl-7.27.0,它工作正常。但是,当我运行时curl -V,我得到:
curl 7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
Run Code Online (Sandbox Code Playgroud)
如何启用 SFTP 协议?
我正在尝试使用带有 cURL 的 sftp 将文件上传到我的网络服务器,如果我curl -V在我的服务器上运行,我会得到这个输出
curl 7.47.0 (i686-pc-linux-gnu) libcurl/7.47.0 zlib/1.2.8 libssh2/1.8.0
Protocols: dict file ftp gopher http imap pop3 rtsp scp sftp smtp telnet tftp
Features: IPv6 Largefile libz UnixSockets
Run Code Online (Sandbox Code Playgroud)
但是,如果我尝试使用 sftp:// 作为curlURL将文件上传到我的服务器,则会在将-v选项添加到 curl 命令后得到以下输出:
* Protocol sftp not supported or disabled in libcurl
* Closing connection -1
curl: (1) Protocol sftp not supported or disabled in libcurl
Run Code Online (Sandbox Code Playgroud)
要使用 SFTP 协议安装 cURL,我在这里使用了这些说明。
当我输入时,curl -v我收到此错误:
curl: symbol lookup error: curl: undefined symbol: curl_url_cleanup
Run Code Online (Sandbox Code Playgroud)
我删除了curl并重新安装了它,但出现了同样的错误。