Last active
May 8, 2024 09:42
-
-
Save jjpeleato/3327c2e38fc0fea7d6602401f9849809 to your computer and use it in GitHub Desktop.
Install Curl with HTTP2 support. (Script run on Ubuntu 16.04, 18.04 or 20.04)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Shell script for install Curl with HTTP2 support. Script run on Ubuntu 16.04, 18.04 or 20.04 | |
# | |
# Notes: | |
# - Ubuntu environment is assumed | |
# - I did run shell script on Ubuntu 18.04 | |
# | |
# Gratitude: | |
# - https://gist.github.com/tlacroix | |
# | |
# Update version to latest, found here: https://curl.se/download/ | |
VERSION=7.76.1 | |
cd ~ | |
sudo apt-get update -y | |
sudo apt-get install -y build-essential nghttp2 libnghttp2-dev libssl-dev wget | |
wget https://curl.haxx.se/download/curl-${VERSION}.tar.gz | |
tar -xzvf curl-${VERSION}.tar.gz && rm -f curl-${VERSION}.tar.gz && cd curl-${VERSION} | |
./configure --prefix=/usr/local --with-ssl --with-nghttp2 | |
make -j4 | |
sudo make install | |
sudo ldconfig | |
cd ~ && rm -rf curl-${VERSION} |
Nice one, thanks!
BTW, is package
nghttp2
necessary? I think installing its related library is enough.
Yes, it is necessary.
Look at the pre requisites according official documentation =)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! I updated my script according your recommendation @tlacroix