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

Thread: [SOLVED] Could not get lock /var/lib/dpkg/lock ?

  1. #1
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    [SOLVED] Could not get lock /var/lib/dpkg/lock ?

    I went here http://linuxowns.wordpress.com/2008/...ecs-in-ubuntu/and pasted the second code then my terminal displayed and end user agreement w/ an "<ok>" at the bottom. I hit enter nothing happened I clicked on the screen nothing happened so I closed it. Now I am getting this error:

    Code:
    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?
    Synaptic package manager is not open and neither is add/remove.
    What? Where am I?

  2. #2
    Join Date
    Jun 2008
    Location
    England
    Beans
    2,568

    Re: Could not get lock /var/lib/dpkg/lock ?

    Open system monitor and kill any open package manager processes.

  3. #3
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Could not get lock /var/lib/dpkg/lock ?

    I have a x-session-manager, a volune manager and a power manager. I know its not the second two what does the first one do?
    Last edited by dizzy1kenobi; November 13th, 2008 at 01:02 AM.
    What? Where am I?

  4. #4
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Could not get lock /var/lib/dpkg/lock ?

    What does apt-get install -f do?
    What? Where am I?

  5. #5
    Join Date
    Sep 2007
    Beans
    1,354

    Re: Could not get lock /var/lib/dpkg/lock ?

    -f attmepts to fix broken dependecies. Your problem is that you have multiple package managers (synaptic, add remove, or apt-get in a terminal) running. You must shut down ALL of them except one in order for it to be able to work.

  6. #6
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Could not get lock /var/lib/dpkg/lock ?

    That error appears when a package manager is running. If you had to cltrl-c on apt-get, aptitude, or dpkg, this error can appear, as well as with GUI package managers like Synaptic, Add/Remove, and Adept. If you are sure you don't have any package managers running, you can delete the lock file
    Code:
    sudo rm /var/lib/dpkg/lock
    A reboot will always solve this problem, but isn't really necessary unless you are worried.

  7. #7
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Could not get lock /var/lib/dpkg/lock ?

    I used
    Code:
    dpkg --configure -a
    to regain control then an update but I still do not understand why a license agreement would show up in terminal and I could not interact with it. What is the answer to this question incase I run into it in the future? Did I miss something?
    What? Where am I?

  8. #8
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Could not get lock /var/lib/dpkg/lock ?

    Quote Originally Posted by jimmy the saint View Post
    -f attmepts to fix broken dependecies. Your problem is that you have multiple package managers (synaptic, add remove, or apt-get in a terminal) running. You must shut down ALL of them except one in order for it to be able to work.
    O K this is why that command brought up the same problem and I was faced with the java agreement again.
    What? Where am I?

  9. #9
    Join Date
    Oct 2008
    Location
    On the road.
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Could not get lock /var/lib/dpkg/lock ?

    Quote Originally Posted by Rocket2DMn View Post
    That error appears when a package manager is running. If you had to cltrl-c on apt-get, aptitude, or dpkg, this error can appear, as well as with GUI package managers like Synaptic, Add/Remove, and Adept. If you are sure you don't have any package managers running, you can delete the lock file
    Code:
    sudo rm /var/lib/dpkg/lock
    A reboot will always solve this problem, but isn't really necessary unless you are worried.
    Apparently just closing the terminal with a license agreement leaves apt-get open waiting for response. Though I could not respond.
    What? Where am I?

  10. #10
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Could not get lock /var/lib/dpkg/lock ?

    Has your problem been fixed? If not, please elaborate.

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
  •