Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: sudo apt-get update (Unable To Lock The List Directory)?

  1. #1
    Join Date
    Feb 2008
    Location
    Missouri, USA
    Beans
    302
    Distro
    Lubuntu

    Question sudo apt-get update (Unable To Lock The List Directory)?

    Hi, I am not able to install anything under software center my sources seem fine they all checked and the install button for programs changed to "use this source" and when i try to use terminal with sudo apt-get update before install i get this message:

    slixz@slixz-netbook:~$ sudo apt-get update
    E: Could not open lock file /var/lib/apt/lists/lock - open (2: No such file or directory)
    E: Unable to lock the list directory
    slixz@slixz-netbook:~$


    any help greatly appreciated

  2. #2
    Join Date
    Feb 2009
    Beans
    47

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    Sure looks like the error one gets when Synaptic is open and you try to use dpkg (apt-get) from command line. Shut down all GUI package management systems before running the apt-get update command. If that does not appear to be the issue, try a reboot. If that does not do anything, empty contents of /var/cache/apt/archives/partial as sudo, open a terminal while nothing else is running and issue command: sudo dpkg --configure -a
    When prompt returns, try again.

  3. #3
    Soul-Sing is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Aug 2006
    Beans
    1,374
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    Indeed a reboot will do mostly or try:

    Code:
    killall aptitude && killall apt-get
    Code:
    sudo rm /var/lib/dpkg/lock
    Code:
    sudo apt-get update
    then if there is a failure:
    Code:
    sudo dpkg --configure -a

  4. #4
    Join Date
    Feb 2008
    Location
    Missouri, USA
    Beans
    302
    Distro
    Lubuntu

    Arrow Re: sudo apt-get update (Unable To Lock The List Directory)?

    I have definitely tried rebooting and a new session still a problem. no software management running. is there a log of details i can get and post. i am not sure where to find such a thing.

    this is what i just did in terminal after fresh boot

    slixz@slixz-netbook:~$ killall aptitude && killall apt-get
    aptitude: no process found
    slixz@slixz-netbook:~$ sudo rm /var/lib/dpkg/lock
    slixz@slixz-netbook:~$ sudo apt-get update
    E: Could not open lock file /var/lib/apt/lists/lock - open (2: No such file or directory)
    E: Unable to lock the list directory
    slixz@slixz-netbook:~$ sudo dpkg --configure -a
    slixz@slixz-netbook:~$ sudo apt-get update
    E: Could not open lock file /var/lib/apt/lists/lock - open (2: No such file or directory)
    E: Unable to lock the list directory
    slixz@slixz-netbook:~$

    ? I've heard about the double process running but its not i have rebooted alot and tried. anything else maybe?

  5. #5
    Soul-Sing is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Aug 2006
    Beans
    1,374
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    Code:
    sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

  6. #6
    Join Date
    Feb 2008
    Location
    Missouri, USA
    Beans
    302
    Distro
    Lubuntu

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    just tried it

    slixz@slixz-netbook:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
    [sudo] password for slixz:
    slixz@slixz-netbook:~$ sudo apt-get update
    E: Could not open lock file /var/lib/apt/lists/lock - open (2: No such file or directory)
    E: Unable to lock the list directory
    slixz@slixz-netbook:~$

    hmm...

  7. #7
    Join Date
    Feb 2009
    Beans
    47

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    I'm currently using Squeeze, I had a look at the /var/lib/apt/lists/lock file on this one and it's just an empty file. Seeing as your error suggest the file is missing, create it with command: sudo touch /var/lib/apt/lists/lock

  8. #8
    Join Date
    Feb 2008
    Location
    Missouri, USA
    Beans
    302
    Distro
    Lubuntu

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    doesnt work gives same message

  9. #9
    Join Date
    Aug 2009
    Beans
    5

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    try this:

    sudo rm /var/lib/apt/lists/lock

    that worked for me.

  10. #10
    Join Date
    Dec 2010
    Location
    Dhaka, Bangladesh
    Beans
    13
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: sudo apt-get update (Unable To Lock The List Directory)?

    Quote Originally Posted by evil_iggy View Post
    try this:

    sudo rm /var/lib/apt/lists/lock

    that worked for me.
    Today I,ve got this problem and this works for me too. Thanks a lot evil_iggy

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •