Install curl with http2 support on debian/ubuntu
SYSTEM_RELEASE=`cat /etc/*release | grep VERSION_CODENAME | cut -d "=" -f 2` NGHTTP2_VERSION="1.9.2" CURL_VERSION="7.46.0" apt-get update && apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools checkinstall -y mkdir /curl cd /curl git clone https://github.com/tatsuhiro-t/nghttp2.git cd nghttp2 autoreconf -i automake autoconf ./configure make -j4 mkdir -p /usr/local/share/doc checkinstall --install=no -D -y --fstrans=yes --reset-uids=yes --pkgname=nghttp2 --pkgversion=${NGHTTP2_VERSION} --pkgrelease=jessie --arch=amd64 --pkglicense=GPL --maintainer="Alexander Galushko" dpkg -i nghttp2_${NGHTTP2_VERSION}-jessie_amd64.deb cd /curl echo "deb-src ftp://ftp.de.debian.org/debian/ stable main contrib" >> /etc/apt/sources.list apt-get remove curl -y apt-get update && apt-get build-dep curl -y wget http://curl.haxx.se/download/curl-${CURL_VERSION}.tar.bz2 tar -xvjf curl-${CURL_VERSION}.tar.bz2 cd curl-${CURL_VERSION} ./configure --with-nghttp2=/usr/local --with-ssl make -j4 /bin/mkdir -p /usr/local/share/zsh/site-functions checkinstall --install=no -D -y --fstrans=yes --reset-uids=yes --pkgname=curl --pkgversion=${CURL_VERSION} --pkgrelease=jessie --arch=amd64 --pkglicense=GPL --maintainer="Alexander Galushko " dpkg -i curl_${CURL_VERSION-jessie_amd64.deb ln -sf /usr/local/bin/curl /usr/bin/curl rm -rf /usr/local/lib/libcurl.so.4 ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0 /usr/local/lib/libcurl.so.4 ldconfig
Check
curl --http2 -I https://nghttp2.org/