在Ubuntu搭建网站环境问题记录

1. 安装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.

原文地址:https://www.cnblogs.com/haoshine/p/5568809.html