红联Linux门户
Linux帮助

在Ubuntu搭建网站环境遇到E: Unable to locate package apache2

发布时间:2016-06-08 10:25:45来源:linux网站作者:小作一个

安装apache2 遇到如下问题:

root@louis:~# apt-get install apache2
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package apache2


解决方案:

在安装apache2之前,先运行命令:

sudo apt-get update


原因是:

before trying to install? The apache2 metapackage is available normally from repositories as is ethtool so there's no need to compile from source. The preferred way to install any software is by using the package manager(s) available to you. Compiling from source should only be last resort or whenever you have special needs from a particular package.


本文永久更新地址:http://www.linuxdiyf.com/linux/21338.html