我使用的CentOS 6.2,我需要在服务器请求一个使用卷曲--http2.0,但我是有7.19.6,看后http://curl.haxx.se/docs/manpage.html给我认为--http2.0选项仅支持curl 7.33.0,所以为了解决这个问题,我按照http://www.linuxfromscratch.org/blfs/view/svn中的步骤安装了curl 7.33.0 . /basicnet/curl.html 安装curl后,我试图使用它,但它仍然给我错误curl(1):不支持的协议,我已经检查了我的卷曲版本使用:curl --version这是给我 :
curl 7.33.0 (x86_64-unknown-linux-gnu) libcurl/7.33.0 OpenSSL/1.0.0 zlib/1.2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz
Run Code Online (Sandbox Code Playgroud)
我需要使用这个--http2.0,但没有得到任何我能做到的事情吗?由于curl 7.19已经安装并且我重新安装了更高版本的curl,这是否有任何问题?
我刚从http://www.openssl.org/source/ [http://www.openssl.org/source/openssl-1.0.1c.tar.gz] 下载并安装了OpenSSL
./config
make
make test
make install
Run Code Online (Sandbox Code Playgroud)
现在我下载了CURL - http://curl.haxx.se/download/curl-7.27.0.tar.gz.尝试使用openssl配置curl给出了以下错误 -
.............................................................
checking for ssl with RSAglue/rsaref libs in use... checking for SSL_connect in -lssl... (cached) no
no
configure: error: OpenSSL libs and/or directories were not found where specified!
[root@curl-7.27.0]# ls -l /usr/local/ssl
total 40
drwxr-xr-x 2 root root 4096 Sep 28 01:21 bin
drwxr-xr-x 2 root root 4096 Sep 28 01:21 certs
drwxr-xr-x 3 root root 4096 Sep 28 01:21 include
drwxr-xr-x 4 root root …
Run Code Online (Sandbox Code Playgroud) 我想将 http/2 与 cURL 一起使用。首先,当我尝试此操作时出现错误curl --http2 https://http2.akamai.com/
- “协议不支持”。我安装了 nghttp2 并重新安装了 cURL,就像这里描述的那样。错误消失了,我现在可以获取数据了curl --http2
。但是页面https://http2.akamai.com/告诉我“此浏览器未启用 HTTP/2”,而在 chrome 中或直接通过 nghttp2 则显示“您现在正在使用 HTTP/2!” 。
我使用的是 mac os x 并通过 homebrew 安装了最新版本中的所有依赖项。我在这里下载了curl源代码(7.41)。