我正在尝试在我的 Ubntu12.X 机器上重新安装 apache2。我以前有 apache2,但由于某些原因,我卸载了它。
我曾经apt-get purge
删除过 apache tomcat,但重新安装时却出现这些错误。我尝试过许多博客中介绍的许多方法,但都无法解决我的问题。
Setting up apache2.2-common (2.2.22-1ubuntu1.4) ...
ERROR: Config file dir.conf not properly enabled: /etc/apache2/mods-enabled/dir.conf is a real file, not touching it
dpkg: error processing apache2.2-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-worker:
apache2-mpm-worker depends on apache2.2-common (= 2.2.22-1ubuntu1.4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-mpm-worker (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2:
apache2 depends on apache2-mpm-worker (= 2.2.22-1ubuntu1.4) | apache2-mpm-prefork (= 2.2.22-1ubuntu1.4) | apache2-mpm-event (= 2.2.22-1ubuntu1.4) | apache2-mpm-itk (= 2.2.22-1ubuntu1.4); however:
Package apache2-mpm-worker is not configured yet.
Package apache2-mpm-prefork is not installed.
Package apache2-mpm-event is not installed.
Package apache2-mpm-itk is not installed.
apache2 depends on apache2.2-common (= 2.2.22-1ubuntu1.4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
apache2.2-common
apache2-mpm-worker
apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
尝试通过运行删除并重新安装apache2.2-common
、、软件包,apache2-mpm-worker
apache2
sudo dpkg -P apache2.2-common
sudo dpkg -P apache2-mpm-worker
sudo dpkg -P apache2
通过运行重新安装上述内容,
sudo apt-get install apache2.2-common
sudo apt-get install apache2-mpm-worker
sudo apt-get install apache2