A broken install of apache2 can't be removed

Bug #14698 reported by Stephen Boulet
8
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Fix Released
Medium
Adam Conrad

Bug Description

Trying to remove apache2 fails in broken installation if "/etc/init.d/apache2
stop" doesn't work. should the uninstall really fail this way?:

$ sudo apt-get remove apache2-common
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  apache2 apache2-common apache2-mpm-prefork
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 3703kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 100174 files and directories currently installed.)
Removing apache2 ...
Removing apache2-mpm-prefork ...
 * Stopping web server (Apache2)...
                                                                    [fail]
invoke-rc.d: initscript apache2, action "stop" failed.
dpkg: error processing apache2-mpm-prefork (--remove):
 subprocess pre-removal script returned error exit status 1
dpkg: apache2-common: dependency problems, but removing anyway as you request:
 apache2-mpm-prefork depends on apache2-common (= 2.0.53-5ubuntu3).
Removing apache2-common ...
 * Stopping web server (Apache2)...
                                                                    [fail]
invoke-rc.d: initscript apache2, action "stop" failed.
Errors were encountered while processing:
 apache2-mpm-prefork
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Stephen Boulet (stephen-theboulets) wrote :

This hackery fixed the uninstall issue: I placed 'exit 0' at the top of
'/etc/init.d/apache2'.

Revision history for this message
Adam Conrad (adconrad) wrote :

This is fixed in 2.0.53-5ubuntu4.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.