繁体   English   中英

apt-get更新和安装Curl的问题

[英]Issues with apt-get update & installing Curl

我正在尝试为PHP安装CURL。 我已经安装了Ubuntu 14服务器。

我在跑步

sudo apt-get update && install php5-curl

我收到以下错误

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.

sudo apt-get更新也有一些错误。 当我尝试去做

ping us.archive.ubuntu.com

我得到回应。

如果我尝试独立

sudo apt-get install php5-curl

我收到以下错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php5-curl

请帮忙。

瓜拉夫-

您在使用apt-get update命令时遇到问题,随后在安装php5-curl软件包时遇到了问题。

您说过您可以ping us.archive.ubuntu.com,因此正在进行域名解析,但不适用于apt-get。 Apt-get在某些网络上使用IPv6遇到了很多问题。 尝试仅使用IPv4运行更新:

apt-get -o Acquire::ForceIPv4=true update

如果可行,您可以通过在/etc/apt/apt.conf.d/文件夹中创建一个文件(可以命名为任何名称,例如99force-ipv4)并在其中添加以下行来永久禁用IPv6:

Acquire::ForceIPv4 "true";

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM