软件包‘apache2’在 Ubuntu 16.04 中没有安装候选项

软件包‘apache2’在 Ubuntu 16.04 中没有安装候选项

几周前,我愚蠢地将 var 文件夹移到了根文件夹中,导致整个系统崩溃。我设法修复了一些问题,但我的网站无法正常工作,因为运行命令时 apache2 不运行/不存在

sudo service apache2

我得到:

Failed to restart apache2.service: Unit apache2.service not found.

当我跑步时

sudo apt-get install apache2

我明白了

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'apache2' has no installation candidate

我真的不知道该如何解决这个问题。我用默认配置替换了 /etc/apt/sources.list。

相关内容