Results 1 to 9 of 9

Thread: Problem with update- Unable to lock Administration directory

  1. #1
    Join Date
    Oct 2011
    Beans
    19

    Exclamation Problem with update- Unable to lock Administration directory

    Hello, I have seen multiple posters have this problem, but none of the solutions worked for me and I had an additional error on top of it. When I run terminal and type in

    sudo apt-get update

    it runs as if it will update, but then I get this message:

    W: GPG error: http://packages.medibuntu.org natty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
    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 have tried to edit the directory, and nothing has worked. I also am unable to use the update manager or the synaptic package handler. I have looked in my system monitor and as far as I can tell none of them are running in the background either.

    Any help is much appreciated.

  2. #2
    Join Date
    May 2010
    Location
    uk
    Beans
    9,374
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Problem with update- Unable to lock Administration directory

    Hi

    Quote Originally Posted by majordread View Post
    W: GPG error: http://packages.medibuntu.org natty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
    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?
    You have two errors here.

    1. You are missing a GPG key
    2. The dpkg lock file is locked.

    You should fix (2) before you fix (1).

    Open a terminal and type

    Code:
    sudo lsof /var/lib/dpkg/lock
    Enter your password. It will not be echoed to the screen.
    This will tell you what has got a lock on dpkg.
    Post the results back here. I am interested to see what has a lock on dpkg.

    You can then either close that program, restart your PC or send a -TERM to the program with the lock by using kill and the pid.

    After that you need to import the key.

    EDIT: Added command.

    Code:
    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2EBC26B60C5A2783
    then type

    Code:
    sudo apt-get update
    Kind regards
    Last edited by matt_symes; October 12th, 2011 at 04:40 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  3. #3
    Join Date
    Oct 2011
    Beans
    19

    Re: Problem with update- Unable to lock Administration directory

    Thanks for the speedy reply.

    After I typed in the command you prescribed, this is what I received:

    lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/tyler/.gvfs
    Output information may be incomplete.
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    dpkg 15004 root 3uW REG 8,1 0 7078501 /var/lib/dpkg/lock


    I also apologize as I am fairly new to Ubuntu, so fixing this is a task in its own for me as of right now, but I hope to learn.

  4. #4
    Join Date
    Oct 2011
    Beans
    19

    Re: Problem with update- Unable to lock Administration directory

    I apologize for the double post, but I killed the program and ran a configure on the dpkg so those errors are gone, now when I run sudo apt-get update I only get this error:

    W: GPG error: http://packages.medibuntu.org natty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783

  5. #5
    Join Date
    May 2010
    Location
    uk
    Beans
    9,374
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Problem with update- Unable to lock Administration directory

    Hi

    Quote Originally Posted by majordread View Post
    lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/tyler/.gvfs
    Output information may be incomplete.
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    dpkg 15004 root 3uW REG 8,1 0 7078501 /var/lib/dpkg/lock
    dpkg itself has a lock on the lock file. It's possible it may have got stuck.

    Out of interest do you have synaptic package manager, update manager or software center running ?

    If so then close that program, otherwise from the terminal type

    Code:
    sudo kill -TERM    15004
    to close dpkg gracefully.

    See my edit on my last post on how to add the keys.

    If you have any problems then post back.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  6. #6
    Join Date
    May 2010
    Location
    uk
    Beans
    9,374
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Problem with update- Unable to lock Administration directory

    Hi

    We're kind of cross posting

    Just in case you missed it.
    See my edit on my last post on how to add the keys.

    If you have any problems then post back.
    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  7. #7
    Join Date
    Oct 2011
    Beans
    19

    Re: Problem with update- Unable to lock Administration directory

    Thanks a lot, both for your timely replies and your help. It worked, I was able to update, and my update programs are working normally again. Thank you very much.

  8. #8
    Join Date
    Jun 2012
    Beans
    1

    Re: Problem with update- Unable to lock Administration directory

    WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/eko/.gvfs
    Output information may be incomplete.
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    dpkg 2815 root 3rW REG 8,5 0 1043009 /var/lib/dpkg/lock



    please help

  9. #9
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,657
    Distro
    Ubuntu

    Re: Problem with update- Unable to lock Administration directory

    Please create a new thread with as much detail as possible.

    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.

Tags for this Thread

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
  •