Sometime it happens, when
1 2 |
apt-get update apt-get install php5-curl |
is not enough. And you really want to upgrade your curl to the latest possible version.
Below is the simple guide:
So, to update curl somewhere on the ubuntu:
1/ Assuming we’re logged in as root and we’re in our home directory.
1 |
wget http://curl.haxx.se/download/curl-7.39.0.tar.gz |
You can update the archive url, pick one from here http://curl.haxx.se/download.html.
2/ Now we need to prepare the instruments for the further actions
1 2 |
apt-get install libtool apt-get install make |
3/ Let’s unpack the curl source code
1 |
tar -xvf curl-7.39.0.tar.gz |
4/ And do the installation
1 2 3 4 5 |
cd curl-7.39.0 # enter the directory where curl was unpacked ./buildconf ./configure make make install |
This way we would compile the curl and libcurl (which is very important step) for our system.
The libtool thing, which we’ve installed before is used during the ./buildconf, and make is make.
5/ Now let’s update our system’s binaries.
1 2 |
mv /usr/bin/curl /usr/bin/curl.bak cp /usr/local/bin/curl /usr/bin/curl |
6/ To finish everything – we should restart every application, which uses PHP
1 2 |
service apache2 restart service php5-fpm restart |
That’s all, now we have our curl updated.