FIX “Could not get lock /var/lib/dpkg/lock – Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Fix “Could not get lock /var/lib/dpkg/lock – Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
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?
Method 1:
First open up a new terminal and use the following command to remove the lock.
If the lock does not remove first time repeat the process above. The screen shot below shows the process of removing the lock as you can see the lock did not remove the first time and I had to repeat the process.rm /var/lib/dpkg/lock
Use dpkg –configure -a to force packages to reconfigure.
sudo dpkg --configure -a
Method 2:
Alternatively you could look up the suspected processes using commands below. By using ps and grep together to create a pipeline we can easily look up suspected packages.
And then killing all processes that can seen in the output in terminal first you will need to look up the processnum it will by listed by the side of the process then use the following commands to kill the processes.ps -A | grep apt
I prefer using the first method by removing the Lock directly however use what ever method suits your situation best. Thanks for reading if you are still having trouble after reading the guide don’t hesitate to leave us a comment below.sudo kill -6 processnum Or we could alternatively use sudo kill -SIGKILL processnum
Thanks for supporting rockstardevil