Jump to content

Update/Install Latest Curl 8.3.0 on RHEL 8/RHEL 7/CentOS stream 8/9 CentOS 7 – CWP/Cpanel/Plesk


Recommended Posts

Upgrade/update/install latest curl version on EL OS platform (redhat/centos). You can also rely on the current OS curl version as it is updated regularly basis with security patches only, if you’re still not satisfied and want the latest features and updates just follow this guide to update curl to latest version.

Short Description on curl :

curl is a command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features. curl is used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications affecting billions of humans daily.

Let’s get started with the upgrade process :

To update to the latest version of CURL running CWP7 server you need to follow below steps.

Cityfan Curl remove : If you previously installed cityfan curl you need to remove it :

rpm -e city-fan.org-release
rm -rf /etc/yum.repos.d/city-fan.repo
rpm -e --nodeps curl libcurl libcurl-devel
rm -rf /usr/local/lib/libssh2.so.1
yum clean all
yum install libcurl libcurl-devel curl

Important ! Stop the future updates via yum/dnf package manager, if you skip this step then after each update of curl from base repo you need to rebuild curl

Centos 7 /EL7 :

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


Centos 8/9 stream /EL8/EL9 :

cat /etc/dnf.conf |grep "^exclude=curl*"|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 :

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

Centos 8/9 stream /EL8/EL9 :

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 Centos 7 /EL7 Centos 8/9 stream /EL8/EL9 : 

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

then follow this steps to activate curl systemwide Centos 7 /EL7 Centos 8/9 stream /EL8/EL9 : 

rm -rf /usr/bin/curl.bak
mv /usr/bin/curl /usr/bin/curl.bak
ln -s /usr/local/bin/curl /usr/bin/curl

After the successful built check the cURL version :

curl -V
curl 8.3.0 (x86_64-pc-linux-gnu) libcurl/8.3.0 OpenSSL/1.0.2k-fips zlib/1.2.7 brotli/1.0.9 zstd/1.5.5 libssh/0.7.1/openssl/zlib nghttp2/1.33.0 libgsasl/1.8.0 OpenLDAP/2.4.44
Release-Date: 2023-09-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL UnixSockets zstd

 

Link to comment
Share on other sites

  • Sandeep B. changed the title to Update/Install Latest Curl 8.3.0 on RHEL 8/RHEL 7/CentOS stream 8/9 CentOS 7 – CWP/Cpanel/Plesk
  • Sandeep B. pinned this topic
  • 1 month later...

If it helps anyone, I've replaced libssh with libssh2 when configuring the cURL build, this way:

./configure --with-ssl --with-zlib --with-gssapi --enable-ldap --enable-ldaps --with-libssh --with-nghttp2

with this one:

./configure --with-ssl --with-zlib --with-gssapi --enable-ldap --enable-ldaps --with-libssh2 --with-nghttp2

as it's instructed by @Sandeep B. doesn't work for me, throwing an error. But it worked fine with libssh2.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Fidolas said:

It gives me :

error: libSSH libs and/or directories were not found where specified!

on configure phase.

Also, after:

rm -rf /usr/local/lib/libssh2.so.1

there is an issue with yum not working anymore. 

Please, explain these steps.

I've fixed the yum issue with libssh2 by creating the right ld to point to the missing file. Now it's working with no problems. Not sure if it was caused by removing the cityfan repo steps, but anyway, it can be solved fixing the link with the ld command.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...