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 http://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 http://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 http://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 http://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 http://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 http://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 http://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 http://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 http://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 http://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.
Curl is a versatile tool that allows you to send and receive data over the network. Installing Curl on Debian is a pretty simple task. For more information about how to use this tool, visit Curl Command Examples . If you have any questions or feedback, feel free to leave a comment.
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: http://www.debian.org/mirror/list
You should not use Ubuntu sources on Debian and vice versa.
I wrote an article on topis how to [manually install curl on debian linu][1]x.
[1]: http://www.jasom.net/how-to-install-curl-command-manually-on-debian-linux. This is its shortcut:
And restart Apache. If you will have an error during point 6, try to run apt-get install build-essential.
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 http://mirrors.kernel.org/ubuntu wily main"
sudo apt-get update
sudo apt-get install curl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With