Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Fixing Could not get lock /var/lib/dpkg/lock

When I used sudo apt-get install it is either getting struck or it is showing an error like this

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?

Can somebody suggest me How to solve this problem??

share|improve this question
Have you tried again after a restart? – kernel_panic Jan 6 '12 at 8:29
have you opened any other resource for installing a software please close it and try again or else wait for that to complete and do it again because it has gained the lock over that folder now you have to wait for it to release or you have force that software to release the lock – VENKI Jan 6 '12 at 8:52

marked as duplicate by Marco Ceppi Jan 6 '12 at 13:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

Well for starters, check to see if any programs are using it, examples include:

update-manager

dpkg

apt-get

software store

If none of these are using it, try restarting your computer, like a good windows user, and if it still is locked you should be able to safely rm the file:

sudo rm -f /var/lib/dpkg/lock
share|improve this answer

Are you running Update Manager or Software Centre at the same time? While updates are running or an application is being installed/uninstalled via the Ubuntu Software Centre, sudo apt-get install/remove cannot function.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.