PDA

View Full Version : [ubuntu] Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailab



yeehi
May 24th, 2012, 09:09 PM
I have just installed Ubuntu 12.04 in VirtualBox.
I want to update the system.

This is the error message I get:



sudo apt-get update && sudo apt-get upgrade
Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)


I have tried repeatedly but keep getting the same error message. I can reach the Internet with Firefox.

What is the problem?
What should I do?

kc1di
May 24th, 2012, 09:12 PM
do you have software center running or synaptic. or update manager?

in any event log out and back in and see if that does it.

kc1di
May 24th, 2012, 09:21 PM
if that does not work try these commands:


sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

madmalc
August 9th, 2012, 03:40 PM
This worked for me - had same problem in 10.04

sumonbdinfo
May 29th, 2013, 06:15 AM
if that does not work try these commands:


sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

Hi,
Thank you for this. I was faced this problem and your way help me for fix this :)

gideonmaina
June 4th, 2013, 09:37 AM
yes the solution to clearing the lock is the one that got me out !

Ashiq_Irphan
September 3rd, 2013, 05:53 AM
if that does not work try these commands:


sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

Thanks, this one worked for me

kinetonat
September 15th, 2013, 04:45 PM
Thanks, this one worked for me

I tried this command in the terminal and thought it might be working as it began to many packages.

However I get this further message:

Fetched 19.8 MB in 38s (520 kB/s)
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?

or if i try again with apt get-update


E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ap@ap-HP-Compaq-dc7600-Convertible-Minitower:~$

It seems to have been happening since i went in search of software in the software centre (12.04 LTS), which could not be found, that the searching just won't stop. I have tried to kill the software centre, log out, and reboot but constantly the 'progress arrows' still show a search continuing.

This is shown also in update manager. ['Unable to get exclusive lock

This usually means that another package management application (like apt-get or aptitude) is already running. Please close that application first.']

kinetonat
September 15th, 2013, 05:35 PM
just tried this command:
sudo rm /var/lib/dpkg/lock

And now have something new going on - as pictured

it just hung there.

In terminal ic an see the problem as:

Fetched 19.8 MB in 1min 48s (183 kB/s)
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
ap@ap-HP-Compaq-dc7600-Convertible-Minitower:~$ sudo dpkg --configure -a
Setting up ntp (1:4.2.6.p3+dfsg-1ubuntu3.1) ...
* Starting NTP server ntpd *** glibc detected *** lockfile-create: free(): invalid next size (fast): 0x08525008 ***
*** glibc detected *** lockfile-create: malloc(): memory corruption (fast): 0x08525048 ***

Can i get any help?

ibjsb4
September 15th, 2013, 07:00 PM
Just do what it says:


sudo dpkg --configure -a

But this is a partial upgrade so don't expect wonders.

http://ubuntuforums.org/showthread.php?t=1859240

kinetonat
September 16th, 2013, 10:13 AM
I typed that in (it is there in the caption) and there followed the text (in bold).

In software centre I have tried to remove ntp, but it just hangs ....'waiting', and will not uninstall

coffeecat
September 16th, 2013, 10:41 AM
Since the previous poster has now opened their own thread for the problem they describe in this thread, I've closed this old thread to prevent further necromancy and dilution of community effort.