View Single Post
Posts: 28 | Thanked: 34 times | Joined on Jul 2012 @ Meran, Italy
#134
Originally Posted by Mohammed Muid View Post
faced this while uninstalling this:
Nokia-N900:~# apt-get --purge --auto-remove remove fennec
Reading package lists... Done
[...]
The following packages will be REMOVED:
fennec*
[...]
Errors were encountered while processing:
fennec
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900:~#
[...]
I had the same problem while uninstalling Fennec 17, and the problem is in the prerm scrpt which is buggy:

in that script, the package manager tries to kill all the instances of fennec using a loop with a sleep and a kill inside; the script is located in:

/var/lib/dpkg/info/fennec.prerm

in order to count the number of Fennec instances still running there is the following line repeated 2 times:

RUNNING=`ps | grep "fennec.*/fennec" | grep -v grep | wc -l`

which sometimes produces 1 or 2 as a result even if there is no fennec running (it should return 0 in that case, and return without errors to dpkg). This is due to the pipe which calls ps that shows lines like 'grep "fennec.*/fennec"' or even the script 'fennec.prerm' itself that are erroneously recognised as fennec instances by the subsequent grep calls in the pipe...

To avoid this problem You can do 2 things:

1. to call the uninstall process (with Ham or whatever method You prefer) while at least 1 instance of Fennec is running, or alternatively

2. to change the lines like the above (there are 2 of them) with the following one (You need sudo or rootaccess):

RUNNING=`ps | grep "fennec.*/fennec" | grep -v fennec.prerm | grep -v grep | wc -l`

pkz

Last edited by pkz; 2012-12-05 at 17:58. Reason: to provide a more complete information
 

The Following 6 Users Say Thank You to pkz For This Useful Post: