Dan*_*ard 4 apache2 apache2.4 14.04
我刚刚从 12.04 更新到 14.04,现在很难设置 Apache 2.4 我收到以下错误:
Setting up apache2 (2.4.10-1+deb.sury.org~trusty+1) ...
ERROR: Module mpm_prefork is enabled - cannot proceed due to conflicts. It needs to be disabled first!
dpkg: error processing package apache2 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
如何禁用 mpm_prefork 以便 Apache 可以继续?
您应该尝试删除符号链接/etc/apache2/mods-enabled/mpm_prefork.{conf,load}:
rm /etc/apache2/mods-enabled/mpm_prefork.{conf,load}
Run Code Online (Sandbox Code Playgroud)
然后重新启动包的配置apache2:
apt-get install -f
Run Code Online (Sandbox Code Playgroud)
或者:
apt-get install apache2
Run Code Online (Sandbox Code Playgroud)
但更重要的是,您应该事先问问自己这些是如何安装在那里的。/etc/apache2在启动之前,您可能已经复制了包含这些(例如)的旧目录apt-get install apache2。