I can't install any thing using

apt-get install

It gives 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), its another process using it

I tried

dpkg --configure -a 
dpkg: error: dpkg status database is locked by another process.

dpkg --configure -a --force-congnew dpkg: error: dpkg status database is locked by another process.

Although I have shut down and restart the system to kill all other hidden process but do not know how to fix it.

I am using all these commands as a super user.

marked as duplicate by karel, Community Jul 12 '16 at 5:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Remove broken locks

  1. Be sure any process is still running associated with these locks:

    sudo lsof /var/lib/dpkg/lock

    sudo lsof /var/lib/apt/lists/lock

    sudo lsof /var/cache/apt/archives/lock

If all of these commands output is empty, you can proceed.

  1. Remove any locks you find in these locations:

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

    sudo rm /var/cache/apt/archives/lock

  2. sudo dpkg --configure -a

  3. Try with sudo apt-get install again.

You should have superuser privileges to run those commands.

  • .......not working. same error mate – Ash Jul 12 '16 at 3:24
  • Which software are you trying to install? – Thiago Rider Augusto Jul 12 '16 at 3:27
  • Have you aborted some apt-get or dpkg command? – Thiago Rider Augusto Jul 12 '16 at 3:31
  • i am trying to install pymol and raccoon, both of them can be easily installed on nay ubunto or fedora. – Ash Jul 12 '16 at 3:31
  • actually i heard this dpkg term for the first time so i guess i never aborted any of them. This is a work station and normally remains ON all the time. – Ash Jul 12 '16 at 3:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.