0

In my web-server configuration troubleshooting I went through a process of uninstalling apache2 and reinstalling it. I accidentally removed the file /etc/init.d/apache2 which is responsible for starting and stopping the apache service.

I've tried reinstalling the apache2.2-common package which is supposed to place the file, but it is still not present.

How can I do a complete reinstall of Apache? The standard apt-get remove and apt-get install doesn't give me that file back.

1

2 Answers 2

1
sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common

This will let you replace config file with out purging package. To remove package use

sudo apt-get purge apache2.2-common

and then install apache the normal way:

sudo apt-get install apache2

I hope this helps

1
  • Yes, it's back!!! :D
    – alt
    Feb 11, 2013 at 4:27
1

You don't need to delete the package first. Just reinstall it:

sudo apt-get install --reinstall apache2.2-common
3
  • Does not fix my problem, but thanks.
    – alt
    Feb 11, 2013 at 4:26
  • It would if I put in the right package name. :) Feb 11, 2013 at 4:37
  • Read this line of my question: "I've tried reinstalling the apache2.2-common package which is supposed to place the file, but it is still not present." That did not solve the problem.
    – alt
    Feb 11, 2013 at 6:19

Not the answer you're looking for? Browse other questions tagged .