Dah… Get rid of the annoying database lock
March 12, 2007
There have been several times that I had to kill the package management program while it was not through yet. In this case the lock of the database could not be removed correctly and further access to it is prohibited.
The problem is simple, but annoying. Plus, it is common especially when you have a fragile access to internet. So here is the solution when someone tells you ‘database is locked’ in ubuntu/debian linux using apt to manage packages.
Here it is, quoted from https://answers.launchpad.net/ubuntu/+ticket/2231
Use this command from konsole:
$ sudo fuser -vki /var/lib/dpkg/lock
This will ask you if you want to kill the process using the file.
Now you can run:
$ sudo dpkg –configure -a
to make sure all packages are fully installed.
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed