[英]Issues with apt-get update & installing Curl
I am trying to install CURL for PHP. 我正在尝试为PHP安装CURL。 I have setup a Ubuntu 14 server.
我已经安装了Ubuntu 14服务器。
I am running 我在跑步
sudo apt-get update && install php5-curl
I am getting the following error 我收到以下错误
Err http://us.archive.ubuntu.com trusty InRelease
Err http://us.archive.ubuntu.com trusty-updates InRelease
Err http://us.archive.ubuntu.com trusty-backports InRelease
Err http://security.ubuntu.com trusty-security InRelease
Err http://us.archive.ubuntu.com trusty Release.gpg
Could not resolve 'host'
Err http://us.archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'host'
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'host'
Err http://us.archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'host'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'host'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'host'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'host'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'host'
W: Some index files failed to download. They have been ignored, or old ones used instead.
install: missing destination file operand after ‘php5-curl’
Try 'install --help' for more information.
There are a few errors with sudo apt-get updated too. sudo apt-get更新也有一些错误。 When I try to do
当我尝试去做
ping us.archive.ubuntu.com
I am getting a response. 我得到回应。
If I try to do a standalone 如果我尝试独立
sudo apt-get install php5-curl
I get the following error 我收到以下错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-curl
Please help. 请帮忙。
Guarav - 瓜拉夫-
You are running into issues with the apt-get update command, and subsequently having an issue installing the php5-curl package. 您在使用apt-get update命令时遇到问题,随后在安装php5-curl软件包时遇到了问题。
You stated you are able to ping us.archive.ubuntu.com though, so domain name resolution is occurring, but it does not work with apt-get. 您说过您可以ping us.archive.ubuntu.com,因此正在进行域名解析,但不适用于apt-get。 Apt-get has a lot of problems I've experienced with IPv6 on certain networks.
Apt-get在某些网络上使用IPv6遇到了很多问题。 Try running the update with just IPv4 with this:
尝试仅使用IPv4运行更新:
apt-get -o Acquire::ForceIPv4=true update
And if that works, you can disable IPv6 permanently by creating a file in the /etc/apt/apt.conf.d/ folder (it can be named anything, for example 99force-ipv4) with this line in it: 如果可行,您可以通过在/etc/apt/apt.conf.d/文件夹中创建一个文件(可以命名为任何名称,例如99force-ipv4)并在其中添加以下行来永久禁用IPv6:
Acquire::ForceIPv4 "true";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.