无法在 Ubuntu 16.04 服务器中安装 Apache

无法在 Ubuntu 16.04 服务器中安装 Apache

我在 Ubuntu 16.04 中安装 Apache2 之前执行命令sudo apt-get update但出现错误(请看下文):

Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://ph.archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'ph.archive.ubuntu.com'
Err:3 http://ph.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'ph.archive.ubuntu.com'
Err:4 http://ph.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'ph.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ph.archive.ubuntu.com'
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'ph.archive.ubuntu.com'
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'ph.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

希望您能立即对此问题作出答复。

谢谢。

答案1

现在一切正常;我只需设置 DNS 并重启网络即可。之后,我可以执行命令sudo apt-get update,并且sudo apt-get install apache2不会遇到任何错误。

相关内容