E: Could not get lock /var/lib/dpkg/lock

Posted on August 26, 2019 at 12:07 pm

If you get the following error while doing apt-get upgrade:

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?

Then probably apt-get is stuck somewhere or you forgot to answer an apt-get question.

To solve this problem just follow these steps:

Check if apt-get is running:

ps aux | grep -i apt

Here is an example output:

root      969735  0.4  0.1  89572 49196 ?        S    13:28   0:01 apt-get dist-upgrade
root      984213  0.0  0.0  12776   916 pts/2    S+   13:33   0:00 grep -i apt

Now kill the process of apt-get (969735):

kill 969735

Now type this to reconfigure dpkg:

dpkg --configure -a

Finally try apt-get update!

Receive updates via email

Other Posts

Updated Posts