Php – curl installation and upgrade

curlPHP

On a centos 5.7 machine we had curl 7.15 installed . We also have PHP installed in it as some of the PHP libraries are linked to curl.

We wanted to upgrade curl to 7.19 but yum update was failing .

Then we manually installed 7.19 with the sources.

Now we have two curl versions

  1. /usr/bin/curl points to 7.15
  2. /usr/local/bin/curl points to 7.19

And PHP still uses curl 7.15 .How to do delete curl 7.15 without removing the dependency (like PHP and make PHP start using curl 7.19?

Best Answer

Oh, god, don't compile from source!

Instead, look a bit further down the curl download page:

http://curl.haxx.se/download.html

and you'll see RHEL5 packages for curl 7.24 and use those instead.

If you really, really need 7.19 specifically, get the SRPM from http://curl.haxx.se/download/ and rebuild it from there. Look at http://wiki.centos.org/HowTos/RebuildSRPM for instructions on how to build from SRPM.

Remember, your first best option is to stay in repo. If that isn't possible, stay in packaging (and be aware that you will be responsible for keeping those non-repo packages up to date). Your last, very very last resort, is to build from source and run make install.

Oh, if you click on the RHEL5 link for curl 7.24, you'll see this text up on top:

The version of curl and libcurl here provides libcurl.so.4, whereas many distributions include a version of curl that provides libcurl.so.3 or libcurl.so.2. This means that installing the curl and libcurl packages from this repository can break a lot of dependencies for applications linked against the older libcurl. This problem can be avoided by also installing the libcurl7155 (for libcurl.so.3) and/or libcurl7112 (for libcurl.so.2) packages, for backwards compatibility

That's how you will deal with, say, php complaining about needing libcurl.so.3.

Related Topic