Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently removed apache2 from my linode ubuntu server with:

apt-get --purge remove apache2

Then tried to install it again (apt-get install apache2). But since then, I can't use apt-get anymore, I get the following (resumed):

ERROR: Site default does not exist!
dpkg: error processing apache2.2-common (--configure):
dpkg: dependency problems are stoping apache2-mpm-worker of being configured
dpkg: dependency problems are stoping apache2 of being configured

E: Sub-process /usr/bin/dpkg returned an error code (1)

If I remove apache2, apache2.2-common and apache2-mpm-worker everything works again, but I need apache installed!

Any ideias of what may be causing the errors?

PS: I translated the errors message, so they might be not entirely accurate

share|improve this question
Do you have a longer error message? There's usually something further up with more detail. – David Oct 16 '12 at 1:59
Here is the complete output of apt-get install – Lucas Pelegrino Oct 16 '12 at 2:14

Looks like you also manually have removed configuration files under /etc/apache2/? Note that those files belong to the package apache2.2-common, hence that being the package you need to make sure gets purged, not merely removed, before you can reinstall it.

share|improve this answer
Hi, how would I do that? apt-get purge apache2.2-common is enough? And yes, there's no /etc/apache2 anymore. – Lucas Pelegrino Oct 16 '12 at 6:13
Sorry, my mistake. Once I did apt-get install apache2 also installed (at least partially) apache2.2-common. So there're configurations files under /etc/apache2. Any ideias? – Lucas Pelegrino Oct 16 '12 at 6:18

Your Answer


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.