Hasitha's Blog is a blog that helps DevOps people do our regular tasks easily and perfectly.
Friday, November 8, 2019
How to fix "Could not get lock" Error while apt install
Sometimes we are having below error while trying to install a package using apt install in linux.
sudo apt install default-jre
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?
Reason: some other process is using /var/lib/dpkg/lock
Resolution:
1. Check whether any other apt install process is running or not. If any process is running wait for that process
2. Reboot OS and try again
3. If above [1] and [2] are not working, the worst option will be removing /var/lib/dpkg/lock file.
sudo rm /var/lib/dpkg/lock
Subscribe to:
Post Comments (Atom)
File Sharing using NFS in GKE Cluster
File Sharing using NFS in GKE Cluster There was a requirement to create common file sharing location which should be accessible by specific...
-
Once you generate SSH key pair to connect to a server using putty and you are going to import it into Xshell you will be noticed below notif...
-
You can use below shell script to simulate a pre-defined load on an API. #!/bin/bash ##########################################...
-
Here is a simple HTTP listener using Python BaseHTTPRequestHandler This Application will, listen to port 8000 on localhost respond to...
No comments:
Post a Comment