How to Fix the Error E: Could not get lock / var / lib / dpkg / lock - open
On this occasion I will share how to solve the error E: Could not get lock / var / lib / dpkg / lock - open (11: Resource is temporarily unavailable) when installing tools. Usually this error occurs because during the failed upgrade process, the cause is because the lock file is open, which causes the processes in the file to be locked. There are 2 ways to fix this, so just take a look.
How to Fix Error E: Could not get lock / var / lib / dpkg / lock - open
The first way
- Shutting down the process
By turning off the locked process, you will be able to solve the error, how to kill the process with the command:
ps aux | grep apt
The second way
- Remove the lock file and redo the configuration
This method we have to delete the lock file, the method may not be recommended, but you can try, how to delete the file with the command
sudo rm / var / lib / dpkg / lock
after finishing deleting the file we have to repeat the configuration with the command
sudo dpkg -configure -a
wait until the configuration process is complete then you will be able to install the tools again
To solve this problem you can choose from one of the ways that I provide you don't need both methods, I recommend using the first method because it's easy while the second method is quite complicated because we have to delete the file system which will risk more severe errors. I hope you can understand and can help you get out of the problem.