Uninstalling nginx via apt-get: Stopping nginx: invoke-rc.d: initscript nginx, action “stop” failed.
If you get something like the following error:
CODE:
-
Removing nginx ...
-
Stopping nginx: 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
-
Starting nginx: /usr/sbin/nginx: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
-
invoke-rc.d: initscript nginx, action "start" failed.
-
dpkg: error while cleaning up:
-
subprocess post-installation script returned error exit status 127
-
Errors were encountered while processing:
-
nginx
-
E: Sub-process /usr/bin/dpkg returned an error code (1)
when you try to execute something like this:
CODE:
-
sudo apt-get remove nginx -yf
Then you need to add
exit 0
to the second line of your
/etc/init.d/nginx
file. Pure hackery but it works.
Should you also clean up the /etc/init.d/nginx file?
Michael Newman
17 Dec 07 at 5:43 pm
I was about to throw my laptop against the wall. Thank you for saving my compy.
meekish
4 Feb 08 at 4:05 am
[...] Fortunately I found the fix to this problem in here : http://www.digitalsanctum.com/2007/11/07/uninstalling-nginx-via-apt-get-stopping-nginx-invoke-rcd-in... [...]
Removing NGINX problem in ubuntu ( or debian ) » kusno.mudiarto
2 Apr 08 at 11:22 am
Thanks! This was causing me to be unable to upgrade my ruby installation.
CLZ
26 Jun 08 at 5:24 pm