如何在Ubuntu中安装apache2

时间:2015-12-26 06:45:44

标签: apache ubuntu

我正在尝试在Ubuntu 12中安装apache2。我在虚拟机中安装了Ubuntu。我有问题。首先,我的系统无法更新或升级。当我输入:

我收到很多这样的错误:

Err http://security.ubuntu.com quantal-security/main Sources
  404  Not Found [IP: 91.189.91.14 80]

在最后一行,这是结果:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

其次,当我尝试安装apache2时。我输入:

sudo apt-get install apache2 apache2-doc apache2-utils

再次,它失败了。结果:

e @ ubuntu:/ etc $ sudo apt-get install apache2 apache2-doc apache2-utils 阅读包裹清单......完成 建立依赖树
阅读国家信息......完成 E:无法找到包apache2 E:无法找到包apache2-doc E:无法找到包apache2-utils e @ ubuntu:/ etc $

你能帮帮我吗?

修改 此命令也不起作用。

sudo apt-get update && sudo apt-get upgrade

我明白了:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.24 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

1 个答案:

答案 0 :(得分:1)

问题出在操作系统安装上。 使用sudo apt-get update && sudo apt-get upgrade。如果你不能更新。然后尝试重新安装操作系统。 全新安装操作系统后,请尝试sudo apt-get install apache2 apache2-doc apache2-utils