How do I install PHP cURL on Linux Debian? I tried the following code and got the error below
apt-get update
apt-get install curl libcurl3 php5-curl
Error:
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en_US Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/i18n/Translation-en_US Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/i18n/Translation-en Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/i18n/Translation-en_US Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/i18n/Translation-en Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en_US Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
W: Failed to fetch //zm.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en Something wicked happened resolving 'zm.archive.ubuntu.com:http' [-5 - No address associated with hostname]
E: Some index files failed to download. They have been ignored, or old ones used instead.
I resolved this issue. My Linux box was unable to browse and resolve hosts names. After adding appropriate roots, the issue was resolved.
Brian
13.5k7 gold badges34 silver badges43 bronze badges
asked Nov 19, 2013 at 14:06
Type in console as root:
apt-get update && apt-get install php5-curl
or with sudo:
sudo apt-get update && sudo apt-get install php5-curl
Sorry I missread.
1st, check your DNS config and if you can ping any host at all,
ping google.com
ping zm.archive.ubuntu.com
If it does not work, check /etc/resolv.conf
or /etc/network/resolv.conf
, if not, change your apt-source to a different one.
/etc/apt/sources.list
Mirrors: //www.debian.org/mirror/list
You should not use Ubuntu sources on Debian and vice versa.
answered Nov 19, 2013 at 14:13
Daniel W.Daniel W.
29.8k13 gold badges89 silver badges146 bronze badges
2
Whatever approach you take, make sure in the end that you have an updated version of curl and libcurl. You can do curl --version
and see the versions.
Here's what I did to get the latest curl version installed in Ubuntu:
sudo add-apt-repository "deb //mirrors.kernel.org/ubuntu wily main"
sudo apt-get update
sudo apt-get install curl
answered Jul 9, 2015 at 14:08
genegcgenegc
1,52216 silver badges16 bronze badges