Installing cURL on Ubuntu 12.04

January 14, 2014 85k views
So I'm trying to add cURL to my droplet, and as other posts here just say to use sudo apt-get install php5-curl this gets all 404 errors from the ppa from this command and so it suggests that I try: apt-get update This goes fine, and a fair number of updates are retrieved. Then when running the install again... the droplet goes down (off the net). Surfing to the IP or any subdomains I've pointed to it cannot be resolved. From the command line I'm unable to even restart apache cause it cannot find the apache directory. This was seriously not what I wanted. I simply wanted to update cURL for php5, but I haven't found any answers on where to get a stable working version of cURL. Any help?
1 comment
5 Answers
Hopefully you did a "snapshot" before your attempt to install curl. If so, I suggest you use it to restore your system and then try the following:

apt-get install curl libcurl3 libcurl3-dev php5-curl

That worked for me.
Run the following first:

sudo apt-get update

use this code:

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

sudo apt-get update

PROFIT!!!

What's the output of
cat /etc/resolv.conf
? Can you ping 8.8.8.8?

From the command line I'm unable to even restart apache cause it cannot find the apache directory.
What error are you getting exactly?

Hi There,
i cant get CURL installed any advice please

apt-get install curl libcurl3 libcurl3-dev php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev'
libcurl3 is already the newest version.
libcurl3 set to manually installed.
libcurl4-openssl-dev is already the newest version.
php5-curl is already the newest version.
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 133 kB of archives.
After this operation, 385 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
curl
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ oneiric-updates/main curl amd64 7.21.6-3ubuntu3.3
404 Not Found [IP: 91.189.92.200 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main curl amd64 7.21.6-3ubuntu3.3
404 Not Found [IP: 91.189.88.153 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.21.6-3ubuntu3.3_amd64.deb 404 Not Found [IP: 91.189.88.153 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Have another answer? Share your knowledge.