Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to re-install apache2 on my Ubntu12.X machine. I had apache2 before but due some reasons I have uninstalled.

I use apt-get purge to remove apache tomcat but while re installing I am getting these error. I have tried many way explained in many blogs, none of the could solve my issue.

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)
share|improve this question
    
have you tried to manually delete this dir.conf file? –  Olu Doug Feb 21 at 14:47
    
I deleted. now seems like its working. Thanks!!! –  user2060435 Feb 21 at 14:51
    
Does it works ? –  Avinash Raj Feb 21 at 14:52

1 Answer 1

Try to remove and reinstall apache2.2-common,apache2-mpm-worker,apache2 packages by running,

sudo dpkg -P apache2.2-common
sudo dpkg -P apache2-mpm-worker
sudo dpkg -P apache2

Reinstall the above by running,

sudo apt-get install apache2.2-common
sudo apt-get install apache2-mpm-worker
sudo apt-get install apache2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.