Fix get lock /var/lib/dpkg/lock – Resource temporarily unavailable
You have been installing packages or updating your repositories and you run in an error message from apt. “Fix get lock /var/lib/dpkg/lock – Resource temporarily unavailable” this error can become quite annoying to beginners don’t worry I will show you how to remove the lock from /var/lib/dpkg/lock this will remove the lock and allow us to continue installing software and resources from Kali Linux repositories.
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?
First, open up a new terminal and use the following command to remove the lock.
If the lock does not remove the first time repeat the process above. The screenshot 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.
Use dpkg –configure -a to force packages to reconfigure.
sudo dpkg --configure -a
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.
ps -A | grep apt
Kill all processes that can be seen in the output of the terminal first you will need to look up the process ID. Process ID will be listed by the side of the processes that are running you then need to use the following commands to kill the processes.
sudo kill -6 processnum Or we could alternatively use sudo kill -SIGKILL processnum
I prefer using the first method by removing the Lock directly however use whatever 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.
get lock /var/lib/dpkg/lock – Resource temporarily unavailable
Thanks for supporting HackingVision
Please consider downloading Brave Browser by downloading Brave Browser through our website you won’t only be downloading a great privacy browser you will also be supporting (HackingVision.com). We are not using Google Ads as we respect our users privacy. We encourage you to use an Ad-blocker or a browser that has a built in ad-blocker and other privacy features such as VPN.
- Top 10 Phishing Tools - 10th April 2020
- Distributed Hash Cracking Hashcat Hashtopolis Tutorial - 30th March 2020
- Cracking Password Hashes with Hashcat Rule-based attack - 27th March 2020