3

I simply have to use the latest cURL version (7.21.3) with PHP on my webserver. (Has to do with specific bug fixes)

It is not available by default on most current Linux variant repositories. (Natty Narwhal by Ubuntu is the only one and it's still in beta stages) - so I cannot simply run "aptitude install php5-curl" or similar to get it (the very latest version of cURL) installed.

How would one go about installing the very latest PHP + cURL packages?

Is it as simple as changing the to-download file for cURL in a repository somewhere? (ie. changing a text file's entry somewhere from http://curl.haxx.se/download/curl-7.21.0.tar.gz to http://curl.haxx.se/download/curl-7.21.3.tar.gz or something..?)

Basically I need the very latest cURL library running with PHP on Linux. How would you personally go about doing that?

1 Answer 1

3

Add natty repository:

$sudo echo "deb http://us.archive.ubuntu.com/ubuntu/ natty main universe multiverse" >> /etc/apt/sources.list $sudo apt-get update 

Create /etc/apt/preferences(change lucid, to your release):

Package: * Pin: release a=natty Pin-Priority: -10 Package: * Pin: release a=lucid Pin-Priority: 900 

Install last php5-curl:

$sudo apt-get install -t natty php5-curl 

Test(curl_version):

$php -i | grep -i curl cURL Information => 7.21.3 php -r 'var_dump(curl_version());' 

or download php5 and curl source codes and build.

6
  • If you use the source - do uninstall the packaged versions first! Otherwise you're going to get into difficulties of the system tries to upgrade them. Commented Feb 3, 2011 at 9:33
  • or use different prefix(./configure) Commented Feb 3, 2011 at 9:40
  • How do you mean "or use a different prefix(./configure)" ??? Sorry, total linux noob here. Commented Feb 3, 2011 at 21:45
  • When configure curl and php and argument --prefix=/srv/php(./configure .... --prefix=/srv/php). Commented Feb 4, 2011 at 4:00
  • Ok went through everything step by step. But noticed it was downloading from maverick still. So I completely erased maverick's sources.list file and replaced it with natty's just for the php install. And I still got the same errors. If you could explain the compilation of php+curl a bit further in your answer I think that should do it! Thank you for all your help! Commented Feb 7, 2011 at 7:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.