Linux system prompts can not get the lock /var/lib/dpkg/lock how to do?

  
                

Some Linux users find that they can't get the lock /var/lib/dpkg/lock while using Linux. How do users solve this problem? The following small series will teach you how to solve this problem. Users who need it will come and see it.

Solution:

Take: 17 http://security.kali.org kali/updates/contrib Sources [20 B]

Get: 18 http://Security.kali.org kali/updates/non-free Sources [20 B]

Get: 19 http://security.kali.org kali/updates/main amd64 Packages [351 kB]

Get: 20 http://security.kali.org kali/updates/contrib amd64 Packages [20 B]

Get: 21 http://security.kali.org kali/updates/non-free Amd64 Packages [20 B]

Download 17.3 MB, takes 54 seconds (320 kB/s)

E: Unable to get lock /var/lib/dpkg/lock – open (11 : Resource is temporarily unavailable)

E: Unable to lock the management directory (/var/lib/dpkg/), is there any other process taking up it?

This occurs mainly due to a software update or installation errors.

Delete two temporary files

sudo rm /var/lib/dpkg/lock

sudo rm /var/cache/apt/archive/lock

The above is the solution to the Linux system can not get the lock /var/lib/dpkg/lock error, if you just encountered this problem, then use the small series of this method to solve it.

Copyright © Windows knowledge All Rights Reserved