Install and Update CURL to Latest version in Centos 7/8 Stream/EL7/EL8/EL9

Discussion about Enterprise Linux includes tutorial and troubleshoot
Post Reply
User avatar
Sandeepb
Site Admin
Posts: 18
Joined: Tue Mar 21, 2023 1:46 pm

Install and Update CURL to Latest version in Centos 7/8 Stream/EL7/EL8/EL9

Post by Sandeepb »

To update to the latest version of CURL running EL7/EL8

Disable base updates to avoid downgrading of curl to base version

Centos 7 /EL7 :

Code: Select all

cat /etc/yum.conf |grep "^exclude="|grep kernel 1> /dev/null 2> /dev/null || echo 'exclude=curl* libcurl*' >> /etc/yum.conf
Centos 8 stream /EL8 :

Code: Select all

cat /etc/dnf.conf |grep "^exclude="|grep kernel 1> /dev/null 2> /dev/null || echo 'exclude=curl* libcurl*' >> /etc/dnf.conf
Now you need install dependencies to build curl and libcurl:

Centos 7 /EL7 :

Code: Select all

yum install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli 
Centos 8 stream /EL8 :

dnf install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli

After you've installed the dependencies build CURL from source :

Code: Select all

cd /usr/local/src
rm -rf curl*
wget https://curl.se/download/curl-7.88.0.zip
unzip curl-7.88.0.zip
cd curl-7.88.0
./configure --with-ssl --with-zlib --with-gssapi --enable-ldap --enable-ldaps --with-libssh --with-nghttp2
make
make insta
ll

After the successful built check the cURL version :

Code: Select all

curl -V
Post Reply