Nginx can't be removed using dpkg if not running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Debian) |
Fix Released
|
Unknown
|
|||
nginx (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: nginx
Description: Ubuntu 8.04
Release: 8.04
nginx Version 0.5.33
When the command "sudo dpkg -r nginx" is run, the following happens
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
nginx
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 606kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 156206 files and directories currently installed.)
Removing nginx ...
Stopping nginx: invoke-rc.d: initscript nginx, action "stop" failed.
dpkg: error processing nginx (--remove):
subprocess pre-removal script returned error exit status 1
Errors were encountered while processing:
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
This occurs because nginx is not currently running, so the invoke-rc.d script fails to "stop" it.
This is fixed by adding --oknodo to the init.d script for nginx.
Changed in nginx: | |
status: | Unknown → Fix Released |
Fixed in Intrepid.