LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 09-05-2005, 07:36 PM   #1
phreakshew
Member
 
Registered: Aug 2005
Distribution: Ubuntu, Kubuntu, Linux Mint
Posts: 97

Rep: Reputation: 16
Question 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?
 
Old 09-05-2005, 08:11 PM   #2
phreakshew
Member
 
Registered: Aug 2005
Distribution: Ubuntu, Kubuntu, Linux Mint
Posts: 97

Original Poster
Rep: Reputation: 16
when I try: killall -w aptget I get: no process killed
I
 
Old 09-05-2005, 08:27 PM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Look for apt and ftp in whatever System manager you use or in htop. Kill those processess.
 
Old 09-05-2005, 08:33 PM   #4
phreakshew
Member
 
Registered: Aug 2005
Distribution: Ubuntu, Kubuntu, Linux Mint
Posts: 97

Original Poster
Rep: Reputation: 16
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-
 
Old 09-05-2005, 09:53 PM   #5
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
NO in the system manager.
If you are using Gnome Look for Gnome system monitor
If you are using KDE look for KDE System Guard

Or open a terminal and run htop
 
Old 09-06-2005, 04:20 AM   #6
phreakshew
Member
 
Registered: Aug 2005
Distribution: Ubuntu, Kubuntu, Linux Mint
Posts: 97

Original Poster
Rep: Reputation: 16
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-

Thanx 4 the info and the help!
 
Old 01-20-2007, 04:18 PM   #7
grepfruit
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
Hello,
the problem is that Synaptics acquires the lock.

Grepfruit
 
Old 06-27-2008, 09:29 AM   #8
tonypop
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
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

Last edited by tonypop; 06-27-2008 at 09:32 AM.
 
Old 07-22-2008, 11:38 AM   #9
raynel
LQ Newbie
 
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
sudo rm /var/lib/apt/lists/lock
 
Old 11-23-2010, 04:27 AM   #10
niiati
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
solving lock problem in ubuntu

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.

Hope this works!
 
Old 11-30-2010, 08:36 PM   #11
chaitya
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
If apt-get doesn't show up in the list of processes, here's a work around to fix this:
1. rm /var/lib/dpkg/lock
2. sudo dpkg --configure -a
 
Old 02-10-2011, 08:12 AM   #12
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
Quote:
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.
  1. Checked for "is another process using it?":
    Code:
    ps aux  | egrep -i 'apt|ftp|kpack|dpkg'  | less
  2. 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
  3. 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
  4. 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.
 
Old 03-22-2011, 07:37 AM   #13
LIAGOS
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 1
Smile

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.
 
1 members found this post helpful.
Old 04-29-2011, 08:16 AM   #14
farnescle
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 1
#rm /var/lib/dpkg/lock
#rm /var/cache/apt/archives/lock
 
1 members found this post helpful.
Old 07-29-2011, 04:24 AM   #15
Never3nd
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: cannot get exclusive lock on /var/lib/rpm/Packages Raafi Fedora 3 03-06-2005 03:45 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages orly Linux - Software 2 09-06-2004 07:13 AM
error:cannot get exclusive lock on /var/lib/rmp/packages mateka Linux - Newbie 1 06-26-2004 10:07 PM
error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages inward_eye Linux - Software 3 08-24-2003 03:07 PM
SIOCSIFFLAGS: Resource temporarily unavailable bleef Linux - Networking 2 05-14-2001 10:54 PM


All times are GMT -5. The time now is 12:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration