Results 1 to 10 of 10

Thread: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

  1. #1
    Join Date
    Oct 2011
    Beans
    5

    Unhappy Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    Hey i keep running intothis error (Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied))
    when ever i try installing jre so i can play minecraft would like to kno if any one could help me with it thx.

  2. #2
    Join Date
    Aug 2007
    Location
    Hastings, NZ
    Beans
    357
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    You have either another application open. Update Manager, Synaptic or Terminal

  3. #3
    Join Date
    Nov 2009
    Location
    Chennai, India
    Beans
    503
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    sorry for the misinformation I accidentally provided
    Last edited by nitstorm; October 1st, 2011 at 06:31 PM. Reason: provided wrong information
    I like to keep it respectful with OpenRespect
    I write at The Void Ghost and 2buntu

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

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    Hi

    Quote Originally Posted by nitstorm View Post
    To add to jon zendatta's answer,

    You have another application that is running under sudo or gksudo, that is super-user permission. Only one application can be executed with super-user privileges at a time. So you will have to wait for that application to stop/end before another application can be executed with super-user privileges.

    You can know which programs run with Super-user privileges as when they need to be run with super-user privileges, they will prompt you for your password.
    Sorry nitstorm bu this is simply not true. You can have many applications, daemons and scripts running as root at the same time.

    You can only install one program at a time though as the dpkg lock file gets locked. The lock file is used as concurrency control for dpkg and is used by dpkg and so indirectly by apt, aptitude, software center, synaptic and update manager (etc).

    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?

  5. #5
    Join Date
    Nov 2009
    Location
    Chennai, India
    Beans
    503
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    Quote Originally Posted by matt_symes View Post
    Hi



    Sorry nitstorm bu this is simply not true. You can have many applications, daemons and scripts running as root at the same time.

    You can only install one program at a time though as the dpkg lock file gets locked. The lock file is used as concurrency control for dpkg and is used by dpkg and so indirectly by apt, aptitude, software center, synaptic and update manager (etc).

    Kind regards.
    Extremely sorry and thanks for catching me there. I know that, and yet don't know what I was thinking when I made that error. Will edit the post. Thanks again and extreme apologies to everyone.
    I like to keep it respectful with OpenRespect
    I write at The Void Ghost and 2buntu

  6. #6
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    You should be able to remove the lock by closing the package management apps as mentioned earlier.

    If you can't find any GUI apps running, you can try closing them via the command line but a safer way is to simply log off and reboot. During a normal shutdown, the apps should close in an orderly fashion and remove the lock. It should be removed after rebooting.

    If rebooting doesn't remove the lock, you can see which apps you have currently running with admin privileges with:
    Code:
    ps -u root
    You can then try killing the app with:
    Code:
    sudo killall <appname> # Example: sudo killall synapic
    GRUB2

    Retired.

  7. #7
    Join Date
    Oct 2011
    Beans
    5

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    xD omg i feel so stupid didnt put sudo infront of
    apt-get install sun-java6-jdk sun-java6-jre

    thanks for help help guys

  8. #8
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)



    Hadn't even thought of that - nor ever seen it mentioned as a solution. We've all done similar things.

    If you wouldn't mind, please mark this SOLVED using the 'Thread Tools' link near the top right of the original post.
    GRUB2

    Retired.

  9. #9
    Join Date
    Dec 2009
    Beans
    6

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    I got this by running:

    sudo apt-get update && apt-get upgrade.

    The fix in my case was to separate the statements:

    sudo apt-get update
    sudo apt-get upgrade

    My guess is that somehow these guys got into a deadly embrace.

  10. #10
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    16,467
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

    Thread closed. Please do not post in old threads.

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
  •