Question

Installing cURL on Ubuntu 12.04

  • Posted January 14, 2014

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?

Subscribe
Share

This worked for me:

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list.d/official-package-repositories.list
sudo apt-get update

More info: https://smyl.es/how-to-fix-ubuntudebian-apt-get-404-not-found-package-repository-errors-saucy-raring-quantal-oneiric-natty/

Short: Ubunto packages were not in the same location because new Ubunto version was released. If you do not want to upgrade your Ubunto version then you have to change packages location with the above command and try apt-get update again. Finally you only have to run:

sudo apt-get install php5-curl

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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!!!

Run the following first: <br> <br>sudo apt-get update

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: <br> <br> apt-get install curl libcurl3 libcurl3-dev php5-curl <br> <br>That worked for me.

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?

What’s the output of <pre>cat /etc/resolv.conf</pre>? Can you ping 8.8.8.8? <br> <br><blockquote>From the command line I’m unable to even restart apache cause it cannot find the apache directory.</blockquote>What error are you getting exactly?