How to fix lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) Error

Sponsored Link
If you are getting the following error when you try to install any packages use the following tip to fix this

Error

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?

Solution

First thing you need to check Synaptic Package Manager open at the same time

or

That happens when synaptic or another package update / installation application is already running. Close any other package managers (including Add/Remove application, language pack installer, etc.) and retry.

Sponsored Link

Incoming search terms:

Related posts

55 thoughts on “How to fix lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) Error

  1. Hi I have a very big prob, my iphone was and still is stuck in safe mode because of fake fermware i could not remove, so i went to var,lib apt,list and deleted all except partial, that didnt work so i went to var,lib,dpkg, and deleted the updates and mistakely the files down below update, now my computer will not recognise my iphone plus there is nothing in cydia under manage except the headlines no packages it says no such files as var,lib dpkg, please help.

    [Reply]

  2. ps -e | grep apt (might show you a number which is essentially a job number. My system was locked due to apt-get and showed me apt-get as job number 1594)

    sudo kill 1594 (modify number to your current run)

    This works perfect without having to delete the lock and causing unnecessary changes to your system

    [Reply]

  3. All processes in linux create lock files that tell another process that it is running or in use. This is so that two programs do no write to a file at the same time and cause each other problems.

    One way to force close the process if you can not do it properly is

    lsof | grep /var/lib/dpkg/lock

    returns something like.
    xx number xx xx xx xx xx xx xx /var/lib/dpkg/lock

    type kill -9 number (this will kill the process id from above)

    —-

    lsof justs lists all open files on your system, and you can use a command like grep to search for the file that is suspect which can be killed if necessary

    [Reply]

  4. Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them ….nothing removing “lock”. Permissions?

    no problem I am root, what do I do?

    [Reply]

  5. Hey , Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them…but none of this worked also when i tried from synaptic package manager ..it didnt work !!!,please guide what to do ?

    [Reply]

  6. Hey friends,
    just type
    sudo bash (or) sudo -s
    This makes you the root user and obtain administrator previlages. type “whoami” and check that you will be the root user…now all apt commands work..
    …cheers..rakhu…

    [Reply]

  7. ps -e | grep apt identified the process number

    Followed by:
    sudo kill #### did not kill the process

    lsof | grep /var/lib/dpkg/lock did not return any results

    However, log off/on did. :)

    [Reply]

  8. from the terminal identify the process number with ps -e | grep apt
    then kill the process with
    kill -9 ####

    [Reply]

  9. I get the following when I run the command, not sure what to do further.

    sreetama@sreetama-laptop:~$ ps -e | grep apt
    4093 ? 00:00:00 aptd
    sreetama@sreetama-laptop:~$ kill -9 4093
    bash: kill: (4093) – Operation not permitted

    [Reply]

    admin Reply:

    try to run this commnd as root using the following command

    sudo kill -9 4093

    enter your password

    [Reply]

  10. try this running this line in your terminal:::sudo killall dpkg && killall frontend
    then run:::sudo apt-get update

    [Reply]

    linger Reply:

    worked for me !! thanks

    [Reply]

Leave a comment

Your email address will not be published. Required fields are marked *