E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
PLEASE HELP!
I goofed-- I was running apt-get upgrade but it was takiing 500,000 years because we are running dialup so I closed the application thinking it would cancel it. Unfortunately, now when I try to run apt-get I get:
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?
I tried killall -w apt-get as root but I don't know how to kill dpkg- Any suggestions?
do you mean in the Synaptic Package Manager? I can see apt and ftp in there- do I remove them and then reinstall? not sure how to kill them in the Manager-
hey I don't know what I did but like 7 hours ago I was able somehow to run apt-get upgrade again and this time it started working soI just left it alone,,, it was fine until about halfway thru then thr modem shut off-? so, I was able to run apt-get --fix-missing and then apt-get update and it seems to be working-
Since I had let it do it's thing all evening I just now got to read the last post. I will file that knowledge along with my growing "how to do stuff in Linux" notebook-
i have an apple when i turn it on theres a var lock on it so it goes to yaboot version 1.3.13 and it asks for a password but i forgot it how do i get through the lock. please help email me at tonypop@yahoo.com
This worked for me in ubuntu and hence I guess it'll be helpful to all ubuntu users.
1. Go to System => System Monitor
2. On the system Monitor go to the Processes
3. Go to view and then choose all processes
4. This will then display the the apt-get process
5. Just end the process and then voila you are good to go.
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?
I just spent the better part of an hour dealing w/ this same error. Here is what I did:
N.B. I ran all these as root.
Checked for "is another process using it?":
Code:
ps aux | egrep -i 'apt|ftp|kpack|dpkg' | less
I killed them all anyway, just to be sure:
Code:
killall -9 apt* kpackage dpkg
If you ever use synaptic (it's removed from my system), you should make that:
Code:
killall -9 apt* kpackage dpkg synaptic
Having confirmed that there were no "rogue" pkg. managers running, I checked, removed, & rechecked the lock file:
Code:
ls -l /var/lib/dpkg/lock
rm -f /var/lib/dpkg/lock
ls -l /var/lib/dpkg/lock
Finally, I ran my "fix":
Code:
aptitude safe-upgrade
I say "my fix" because I am still a die-hard aptitude user -- Last time I looked Debian had deprecated apt-get; however, I have seen reports that apt-get is being resurrected. You will need to do the appropriate thing for the pkg. manager you are using.
Comments
My final success came running the above in a console (Ctrl-Alt-F6), not an X-term, e.g. Konsole inside KDE. However, I don't know for sure if that was necessary, as I was very frustrated when /var/lib/dpkg/lock seemed to reappear over & over, & ready to beboot the box; but I have no proof that I had followed my own #3 above, before I moved to the console. I saw advice on another forum to reboot the box, & tried the console 1st, before using more drastic measures -- an X restart (Ctrl-Alr-Bksp) or a full reboot.
I got into the mess trying to install google-chrome-stable using dpkg -i, I didn't think to try installing the d/l-ed .deb w/ aptitude.
Been trying to get this fixed for the past two hours, after lockup of installation of flashplayer.
All the below commands are run as sudo su in the root account.
I fixed it by going through the following:
1> sudo updatedb
{ updating the file database }
2> kill -9 $(pidof dpkg)
3> kill -9 $(pidof synaptic)
4> kill -9 $(pidof apt-get)
5> locate lock | grep /var
{Search for any lock files. Prune the list looking for any single file called "lock"}
6> rm -rf /var/lib/dpkg/lock
{This will forcefully removed the locks}
7> apt-get upgrade
8> dpkg --configure -a
{I then re-ran this command, this then caused the previous broken packed to fail thus releasing the regeneration of the software lock.}
After doing this I reran the updatedb and locate lock | grep /var to ensure that the lock didn't come back.
I find now work..
This is another alternative.
Cheers, I hope this helps
Last edited by LIAGOS; 04-29-2011 at 11:59 PM.
Reason: To make it easier to follow.
Im new at this and having the same problem trying to download java6, I went thru the tutorial and downloaded the plugins, came to the license agreement but no where to click ok or type in accept. Then tryed to look for sun-java in the terminal came up with the E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable). I went and did every code ya'll said but dnt know if it worked. Anyway to see if I deleted it so I can try to reinstall. Thanks for ya'lls time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.