I need to upgrade cURL to the latest version on Centos

2.6.18-164.15.1.el5.centos.plusxen #1 SMP Wed Mar 17 20:32:20 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

I'm unable to find any suitable packages to do so via yum or rpm. Is there a standard way to do this upgrade without installing from source?

  • Which version of CENTOS are you running? I am too lazy to cross check current kernel versions and CENTOS version numbers ... Oct 14, 2011 at 0:15
  • Too lazy or too cool? (kidding) We're running 5.4, most of the time. Occasionally 5.6 Is there a notable difference there? Oct 14, 2011 at 4:36
  • OP, could you please accept an answer? The top answer worked successfully for me, and this will be helpful to future users Sep 20, 2016 at 21:25

4 Answers 4


This is an old question, but it is still one the first results in google search, so I'd like post the solution that solved my problem.

  1. Create a new file /etc/yum.repos.d/city-fan.repo

  2. Paste the following contents:

    name=City Fan Repo
  3. Type this into the terminal:

    yum clean all
    yum install curl 
  4. And it's done!

Observe that for other RHEL/CentOS versions, all you have to do is specify the appropriate CityFan URL.

  • Confirming that (on my version of Centos 6.5), this is the only thing that worked. Simply typing in yum update curl or yum install curl alone did NOT work!! Sep 20, 2016 at 21:18
  • Should I delete the city-fan.repo after updating? I've read it could cause problems when getting other non-official updates.
    – andreszs
    Jul 28, 2017 at 0:10
  • 4
    Before you update using city-fan, see the information on that on the official centos wiki: wiki.centos.org/AdditionalResources/Repositories. It is classified as a known problem repo.
    – Khanna111
    Aug 15, 2017 at 21:48
  • 2
    Beware, I tried this on a server running CentOS 7 and it broke both curl and yum with error like curl: error while loading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directory Oct 1, 2018 at 17:56
  • 1
    I tried this on the latest CentOS 7 and it worked great. (Using this repository was a semi-last resort. I first tried compiling curl myself, but it didn't support SSL by default, and compiling with SSL requires a rabbbit-hole of dependencies.)
    – James
    Nov 26, 2018 at 17:27

Why do you need to upgrade curl? Is there a specific feature you're missing?

You can get it straight from the developer:


Scroll down to the Redhat (thanks twirrim) listings, find a suitable RPM (RHEL5 based) and install.

  • We specifically need a feature introduced in 7.16.2, CURLOPT_TIMEOUT_MS for setting really small timeouts. We're trying to create 'fire and forget' requests. The fedora listings we've tried are actually source packages, which we're unfamiliar with. Can you provide some help/advice when upgrading via source? Oct 14, 2011 at 4:24
  • 1
    On the above link what you want are the RHEL packages, CentOS5 is based on RHEL5 so packages for that should work on it. Helpfully that page only suggests there are i386 versions, but there are actually x86_64 bit versions on the link it sends you to. from mirror.city-fan.org/ftp/contrib/sysutils/Mirroring , mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/… ought to do the trick.
    – Twirrim
    Oct 14, 2011 at 4:46
  • Haha. Thanks twirrim, I stopped scrolling at fedora. :-/ They look like the same packages anyway, it's just easier to filter by RHEL version than equivalent FC version. Oct 20, 2011 at 12:51
  • And CURL_HTTP_VERSION_2_0 is not supported in older versions as well.
    – andreszs
    Jul 28, 2017 at 0:11

Could not get taksan's answer to work for my setup here is what I used

yum install epel-release -y
rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
yum update curl

more related answers can be found here Upgrading curl on centos 6: libcurl-7.50 requires libnghttp2

  • The link was broken
    – xwlee
    Nov 12, 2018 at 6:15
  • 1
    Version 2-1 is now at that location. $ sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel6.noarch.rpm However for me, centos 7.6.1810 (and curl 7.29.0) using 2-1.rhel7 did not result in curl updating version :-(
    – gaoithe
    Jan 8, 2020 at 14:41

Latest stable curl verison is 7.22.0, but so far 7.19.7-16 is the CentOS latest. So you either have to find a repository that offers the latest build now or wait for the CentOS base repo to update the build.

yum update curl

I found a repo for you:


You could wget the libcurl and curls files from the link above and then rpm –Uvh packagename, install the libcurl and then the curls pack.

  • None of the packages at that URL worked. Also, does the 'development' folder imply these are newer / in development packages? Oct 14, 2011 at 5:04
  • So I actually did some research into those packages. It seems like Fedora using SHA checksums while rpm requires md5. From a lot of googling, it seems there is a process to circumvent that. Are you aware of what it is? Oct 14, 2011 at 14:56
  • Yes, don't use Fedora packages in RHEL ... and esp. don't use newer Fedora packages in RHEL-5. You might be able to rebuild the latest Fedora .src.rpm for RHEL-5 ... but you'll get to keep all the pieces if you do that. In general you shouldn't be trying to upgrade core OS components. Oct 14, 2011 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .