1

This question already has an answer here:

The following packages have unmet dependencies:

apache2: 
    Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.2 is to be installed or
             apache2-mpm-prefork (= 2.2.22-1ubuntu1) but it is not going to be installed or
             apache2-mpm-event (= 2.2.22-1ubuntu1) but it is not going to be installed or
             apache2-mpm-itk (= 2.2.22-1ubuntu1) but it is not going to be installed
    Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.2 is to be installed

E: Unable to correct problems, you have held broken packages.

Having trouble reinstalling apache.

marked as duplicate by Eric Carvalho, Jorge Castro, user76204, qbi, Florian Diesch Feb 26 '13 at 19:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

9

First go back to a state there all dependencies are satisfied:

 sudo apt-get install -f

Try to remove all apache stuff:

 sudo dpkg --purge --force-depends "apache*"

Reinstall now all necessary dependencies:

 sudo apt-get install -f

Now you can give the apache installation a new try. If the problem persists, please provide more informations.

  • When I tried using your commands I get the same message of unmet dependencies after sudo apt-get install apache2 php5 php5-mysql phpmyadmin I then tried your command you provided with no result.>> warning:** there's no installed package matching apache2.conf Thanks. – frqcuse Feb 26 '13 at 18:43
  • 1st 'apt-get install -f' to go back to a stable situation – H.-Dirk Schmitt Feb 26 '13 at 21:28
  • dpkg --purge --force-depends needs quotes around "apache*" because your invoked it in a directory containing files matching the "apache*" pattern (e.g. apache.conf) – H.-Dirk Schmitt Feb 26 '13 at 21:30
  • @frqcuse If your problem is resolved, don't forget to close this question. – H.-Dirk Schmitt Mar 13 '13 at 12:20
  • apt-get install -f worked better than apt-get -f install for me – myol Sep 10 '14 at 11:08

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