A broken install of apache2 can't be removed
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.
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)...
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-
Removing apache2-common ...
* Stopping web server (Apache2)...
invoke-rc.d: initscript apache2, action "stop" failed.
Errors were encountered while processing:
apache2-
E: Sub-process /usr/bin/dpkg returned an error code (1)
This hackery fixed the uninstall issue: I placed 'exit 0' at the top of d/apache2' .
'/etc/init.