相关疑难解决方法(0)

带有CURL的HTTP2给出"不支持的协议"

已经按照这里的步骤,我仍然Unsupported Protocol使用curl --http2选项.类似地,设置CURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_2_0使用HTTP/1.1进行通信的结果在节目中,未HTTP/2.

平台:VMware Player 7上的Ubuntu 15.04.

我已经安装了nghttp2-1.0.4 --prefix=/usr/local,因此libnghttp2.*位于/usr/local/lib.

这是配置curl-7.43.0的代码:

./configure --with-nghttp2=/usr/local
Run Code Online (Sandbox Code Playgroud)

结果显示HTTP2已启用:

    HTTP2 support:    enabled (nghttp2)
Run Code Online (Sandbox Code Playgroud)

makesudo make install,以下回报Unsupported Protocol:

curl --http2 https://http2.akamai.com
Run Code Online (Sandbox Code Playgroud)

curl版本不支持nghttp2:

curl 7.43.0 (i686-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB …
Run Code Online (Sandbox Code Playgroud)

curl http2

16
推荐指数
1
解决办法
1万
查看次数

在curl 7.33.0中使用--http2.0选项会提供不支持的协议

我使用的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,这是否有任何问题?

linux curl http2 nghttp2

6
推荐指数
1
解决办法
6874
查看次数

标签 统计

curl ×2

http2 ×2

linux ×1

nghttp2 ×1