PDA

View Full Version : [ubuntu] Error when trying to uninstall a package.



stewartm82
July 17th, 2009, 05:37 PM
Hi I am getting the following error when trying to uninstall nginx. Any suggestions as to how I might fix it. I am out of ideas.



stewart@stewart:/var/cache/apt/archives$ sudo apt-get remove nginx
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 0 not upgraded.
After this operation, 676kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 33726 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)

dstew
July 17th, 2009, 07:09 PM
It looks like nginx was running at the time removal was attempted, and could not be stopped by the removal script. Make sure the program is stopped, then try again.

stewartm82
July 18th, 2009, 05:00 PM
I am not sure how to shut nginx down. I cant find any processes that mention it.

running_rabbit07
July 18th, 2009, 07:57 PM
Try opening System Monitor and going to the Proccesses tab and finding the program and click to kill process. I don't know what that program is but if it is a system required program you may want to leave it be.

I would also recommend upgrading to a supported version of Ubuntu if possible.

stewartm82
July 19th, 2009, 12:22 PM
Its a remote server that i dont have access too. I have tried using ps -aux and htop to see what processes are runing but no luck. I was wondering if a restart would help although the only problem is that i am not sure how to stop nginx from starting at boot. Can some one tell me how to stop nginx loading at boot?

dstew
July 20th, 2009, 04:11 PM
Look in System --> Preferences --> (Sessions in some versions) --> Startup Programs. If you see this program there, you can edit the startup preferences for it. You can also look in System --> Administration --> Services, and uncheck it if it is there. If none of these work, there are some command line things you can try.

stewartm82
July 21st, 2009, 11:29 AM
It will have to be command line as the system is a VPS that i own. Could you tell me how to do this in the command line? I restarted and I still get the same problem but I would suggest that could be because Nginx does not shut down correctly for some reason.