It seems like curl packed with ubuntu 16.04 does not have http2 support. How do I enable http2 in curl
Asked
Active
Viewed 2.5k times
1 Answers
46
As of now (Jan 2018). You will have to install curl from source to get http2 support. You can do that using the following commands
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
wget https://curl.haxx.se/download/curl-7.63.0.tar.gz
tar xzf curl-7.63.0.tar.gz
cd curl-7.63.0
./configure --with-nghttp2 --prefix=/usr/local --with-ssl
make && sudo make install
sudo ldconfig
/usr/bin/curl
lately. https://askubuntu.com/q/923527/453746 – Jeff Puckett Jun 08 '17 at 22:05sudo apt-get install libssl-dev
first and add run configure command this way:./configure --with-nghttp2 --prefix=/usr/local --with-ssl=/usr/local/ssl
– Stalinko Aug 28 '17 at 09:19configure
reads it from env variablesOPENSSL_CFLAGS
andOPENSSL_LIBS
– Stalinko Aug 28 '17 at 17:22curl -V
doesn't list HTTP2 in Features. – Tibor Nagy Nov 08 '19 at 15:10curl -V
is using also the correct path,/usr/local/bin
is at the beginning of my $PATH and I see also from the version, that the correct curl instance is called. BTW the output isurl 7.63.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3 Release-Date: 2018-12-12 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
– Tibor Nagy Nov 11 '19 at 16:25