Monday, March 26, 2012

Package is in a very bad inconsistent state - Sub-process /usr/bin/dpkg returned an error code (1)

Error
Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal.
Sub-process /usr/bin/dpkg returned an error code (1)

while updating linux package

Solution
#1: stop the service that you are updating and re-update again

sudo sudo service "YOURSERVICE" stop

#2: If this didn't work

1-Go to /var/lib/dpkg/info
2-Find YOURSERVICE.prerm file
3-Edit it and change exit $? to 0 and exit 1 to 0
4- re-update again

Note: solution #2 is not recommended but sometimes it works


No comments:

Post a Comment