You must have seen this (that’s why you’re here after all!)
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
This often happens if you try to install a package (say, <package-name>) while you are installing another. As an example, this may happen when you try to run
$ sudo aptitude install <package-name>
in the terminal while you have Synaptic package manager open (or vice versa) or in another terminal you are installing another package . The easiest solution is just to wait for the other installation(s) to finish and close the package manager if you are done with it. However, if the package manager is crashed in the middle some stuck-up processes may still be using the lock (/var/lib/dpkg/lock).
In that case, use fuser to find out the runaway process(es); and while you’re at it, you may use -k flag which will kill the process that is still using /var/lib/dpkg/lock. Then configure (--configure) all the packages (-a) which are yet unpacked and unconfigured, using dpkg:
$ sudo fuser -vki /var/lib/dpkg/lock; sudo dpkg --configure -a
In the first command (fuser), the -i flag asks for user confirmation, and -v is for verbose mode.
After that, proceed to the usual installation step of the package that you want to install.
John Ferry said:
HEY THANKS A LOT! When I went to this site this is the only one that worked! AWESOME INSTRUCTIONS!
Chris said:
cheers mate worked great! 😀
Adam said:
helped out a lot thx awesome instructions no joke!
Jonathan said:
Thank you so much !!!!
yuva said:
Great !! It helped a lot..
karthick said:
Thanx a lot.. well explained
zach said:
thanks so much ive tried at least 50 other sites this is the only one that worked thank you so much
abel said:
yeah! i stop searching here thanks
rahul said:
thank u!!!!!!!
Elipeta Sotabento said:
i love it!! thank you so much
sahil khanna said:
excellent thanks a lot i am new user of ubuntu and it helped so very much but why do we get this error if you can explain that it would be of great help as then in future we would be more aware of not making any fault. 😉 but thanks a ton for this
Henry said:
i dnt knw why mine is still the same.. it said error… dkpg is locked by another process
yogesh said:
it’s not working………….
is there another way to do it.
even i can’t open synaptic manager also.
Priya said:
I was not able to do that. I got the following error message:
dpkg: error processing man-db (–configure)
What should I do with that? It will be great if you could help me with that..
kousik said:
It’s not possible to suggest a fix without seeing the complete error message. However, you may want to take a look at the following thread at the Ubuntu forum:
http://ubuntuforums.org/showthread.php?t=1482631
Joe said:
I knew the second part, but I was manually hunting all over the place for lock files. Thank you!
Pingback: Unlock /var/lib/dpkg/lock | yudinugraha07
Pingback: Unlock /var/lib/dpkg/lock when you’re locked out « just another blog,
Philip said:
Thank you very much! That worked =)
/Phil
Linmoy said:
thanx man…great work
rikoy said:
thanks you..
nana said:
thanx man….it worked
hanes said:
Thank You.
now the update-manager is working again
John MIHIGO said:
this is really helpfull
Pingback: How To Fix Error Processing Man-db in Windows
Anonymous said:
Thanks alot dude, it worked! 😀
Anonymous said:
nice work guy
Many thanks
Anonymous said:
many thanks