CentosControl PanelCWPLinuxVesta CP

Update/Install Latest Curl Version on RHEL 8/RHEL 7/CentOS 8/CentOS 7 – CWP/VestaCP/Cpanel/Plesk

In this tutorial we’ll 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 :

Update Curl on RHEL 8 / CentOS 8  (currently no update for curl in centos 8):

rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel8/x86_64/city-fan.org-release-2-2.rhel8.noarch.rpm
dnf install -y yum-utils
dnf-config-manager --disable city-fan.org
dnf --enablerepo=city-fan.org install libcurl libcurl-devel curl

**not yet updated for centos 8

Update Curl on RHEL 7 / CentOS 7 :

rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
yum install -y yum-utils
yum-config-manager --disable city-fan.org
yum --enablerepo=city-fan.org install libcurl libcurl-devel

Update Curl on RHEL 6 / CentOS 6 :

# x86_64
rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm
yum install -y yum-utils
yum-config-manager --disable city-fan.org
yum --enablerepo=city-fan.org install libcurl libcurl-devel

# i386
rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/i386/city-fan.org-release-2-1.rhel6.noarch.rpm
yum install -y yum-utils
yum-config-manager --disable city-fan.org
yum --enablerepo=city-fan.org install libcurl libcurl-devel

Done you’ve successfully updated your curl version on your EL OS.

To check the Version of the Curl via command line type in this command :

curl -V

Example output :

curl 7.84.0 (x86_64-redhat-linux-gnu) libcurl/7.84.0 NSS/3.67 zlib/1.2.7 libpsl/0.20.2 (+libidn2/2.
.2) libssh2/1.10.0 nghttp2/1.33.0 OpenLDAP/2.4.44
Release-Date: 2022-06-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp
cp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_W
PSL SPNEGO SSL UnixSockets

How to Update curl to future version :

For stability reason it will not updated via yum update command as the repo is disabled you can run this following command to update curl manually ensure you’ve followed upper mentioned steps:

yum --enablerepo=city-fan.org install curl libcurl libcurl-devel libmetalink libpsl libssh2 libssh2-devel
or
yum --enablerepo=city-fan.org update curl libcurl libcurl-devel libmetalink libpsl libssh2 libssh2-devel

Isn’t it as simple as pie? let me know about your experiences with the upgrade process via comment.

Sandeep B.

I'm a system admin and php developer and currently working as System Admin In CWP Control panel, expertise in Linux and Windows administration RHEL certified admin.

Related Articles

20 Comments

  1. Worked great for me on CentOS7, however a few things to note:

    – I got the libnghttp2 error when I tried to install, installing EPEL then re-running the curl install command fixes this:
    # yum search epel-release
    # yum info epel-release
    # yum install epel-release

    – It displayed the new curl version in Plesk however not on my wordpress website, software restarting my server fixed this, theres probably a better way but it only takes about a minute to restart my server

  2. I’ve managed to get curl version 7.74 installed on CentOS 6.10. But unfortunately http2 is not enabled. Do you know if it is possible to enable http2?
    “# curl –version
    curl 7.74.0 (x86_64-redhat-linux-gnu) libcurl/7.74.0 OpenSSL/1.0.1e-fips zlib/1.2.3 c-ares/1.17.1 libssh2/1.8.2
    Release-Date: 2020-12-09
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
    Features: alt-svc AsynchDNS GSS-API HTTPS-proxy IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB SPNEGO SSL UnixSockets”

  3. Hello, I have followed “Update Curl on RHEL 7 / CentOS 7 :” and have updated on centos 7 :
    “curl –version
    curl 7.78.0 (x86_64-redhat-linux-gnu) libcurl/7.78.0 NSS/3.53.1 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.33.0 OpenLDAP/2.4.44
    Release-Date: 2021-07-21”

    but i have checked on my website ( 02 webs : 1 web using wordpress and 1 web using whmcs ) still show old version of curl :
    cURL version
    7.29.0 NSS/3.53.1

    how to fix this problem ? Thank you

  4. HI:

    Curl on CentOS 6.10 worked like a champ. Thank you.
    on CentOS 7.8.2003, the install works (does not report any errors), but after the update, the version string still shows NSS/3.44.
    Am I missing something?
    # curl -V
    curl 7.71.1 (x86_64-redhat-linux-gnu) libcurl/7.71.1 NSS/3.44 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.33.0
    Release-Date: 2020-07-01
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL UnixSockets

  5. The RHEL8 repo of city-fan does not contain a newer version of curl, that part of the instruction should be removed.

  6. Hi, Im having problems running this on CentOS 7. It complains of broken deps..

    yum –enablerepo=city-fan.org install libcurl libcurl-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * city-fan.org: http://www.city-fan.org
    Resolving Dependencies
    –> Running transaction check
    —> Package libcurl.x86_64 0:7.29.0-54.el7 will be updated
    –> Processing Dependency: libcurl = 7.29.0-54.el7 for package: curl-7.29.0-54.el7.x86_64
    —> Package libcurl.x86_64 0:7.53.1-2.0.cf.fc7 will be an update
    –> Processing Dependency: c-ares >= 1.12.0 for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    –> Processing Dependency: libssh2 >= 1.8.0 for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    –> Processing Dependency: libcares.so.2()(64bit) for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    –> Processing Dependency: libcrypto.so.6()(64bit) for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    –> Processing Dependency: libldap-2.3.so.0()(64bit) for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    –> Processing Dependency: libssl.so.6()(64bit) for package: libcurl-7.53.1-2.0.cf.fc7.x86_64
    —> Package libcurl-devel.x86_64 0:7.29.0-54.el7 will be updated
    —> Package libcurl-devel.x86_64 0:7.53.1-2.0.cf.fc7 will be an update
    –> Processing Dependency: libssh2-devel for package: libcurl-devel-7.53.1-2.0.cf.fc7.x86_64
    –> Running transaction check
    —> Package c-ares.x86_64 0:1.12.0-2.0.cf.fc7 will be installed
    —> Package compat-openldap.x86_64 1:2.3.43-5.el7 will be installed
    —> Package curl.x86_64 0:7.29.0-54.el7 will be updated
    —> Package curl.x86_64 0:7.53.1-2.0.cf.fc7 will be an update
    –> Processing Dependency: libmetalink.so.3()(64bit) for package: curl-7.53.1-2.0.cf.fc7.x86_64
    —> Package libssh2.x86_64 0:1.4.3-12.el7_6.3 will be updated
    —> Package libssh2.x86_64 0:1.8.0-3.el7 will be an update
    —> Package libssh2-devel.x86_64 0:1.8.0-3.el7 will be installed
    —> Package openssl098e.x86_64 0:0.9.8e-29.el7.centos.3 will be installed
    –> Running transaction check
    —> Package libmetalink.x86_64 0:0.1.3-2.fc7 will be installed
    –> Processing Dependency: libexpat.so.0()(64bit) for package: libmetalink-0.1.3-2.fc7.x86_64
    –> Finished Dependency Resolution
    Error: Package: libmetalink-0.1.3-2.fc7.x86_64 (city-fan.org)
    Requires: libexpat.so.0()(64bit)
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    Even using –skip-broken produces a new set of errors which I cant resolve.

      1. Hi, thanks for the help. Im making progress but now curl is complaining about broken libnghttp2 deps

        Error: Package: libcurl-7.66.0-1.1.cf.rhel7.x86_64 (city-fan.org)
        Requires: libnghttp2.so.14()(64bit)
        You could try using –skip-broken to work around the problem
        You could try running: rpm -Va –nofiles –nodigest

        I installed these..

        > yum install libnghttp2 libnghttp2-devel –enablerepo=city-fan.org

        Verified…

        > yum list installed | grep libnghttp2
        libnghttp2.i686 1.7.1-1.el7 @city-fan.org
        libnghttp2-devel.i686 1.7.1-1.el7 @city-fan.org

        But I still get the same error when I run

        > yum –enablerepo=city-fan.org install libcurl libcurl-devel

        Thanks for any advice!

        Sorry I cant figure out how to format my post properly 🙁

        1. Edit: I finally got this working.

          Even though libnghttp2 is available on city-fan.org, it seems you cannot use that version.

          Instead you have to install it from epel repo.
          After that you can go ahead and install curl from city-fan.org with no further problems

          Thanks

  7. Thanks for the steps with the upgrade process here. I followed your steps but that just upgraded libcurl and not the actual cURL package. Can you pls help if there needs to be update along that side?

    curl -V
    curl 7.65.3 (x86_64-redhat-linux-gnu) libcurl/7.66.0 NSS/3.36 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.31.1

    1. Hi, libcurl is the curl package. I see you have updated curl package successfully. if you wan to update curl devel package then you need to run this command :
      yum --enablerepo=city-fan.org install libcurl libcurl-devel
      or
      yum --enablerepo=city-fan.org update libcurl libcurl-devel

Leave a Reply

Your email address will not be published.

Back to top button