How to Fix (E: Unable to lock the administration directory (/var/lib/dpkg/) Error on Ubuntu? – On Linux systems, when you try to install a program on the Synaptic or Terminal, you may sometimes encounter with a (/var/lib/dpkg/) error.
How to Fix (E: Unable to lock the administration directory (/var/lib/dpkg/) Error on Ubuntu?
The (/var/lib/dpkg/) error will prevent you from installing a program from the Linux repository. b usually occurs in a concurrent program installation. For example, if you are using the Ubuntu operating system and you are trying to install a program with APT, if you encounter the (/var/lib/dpkg/lock) error, all you have to do is delete this folder.
I encountered with this error when I install the GNS3 IOU using apt on Ubuntu 17.10. The application you are trying to install may be different.
If the error you get when you try to install a program with apt on Linux looks like in the following output, you have to resolve the /var/lib/dpkg/lock error.
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?
How to Fix could not get lock /var/lib/dpkg/lock – open (11 resource temporarily unavailable)
The could not get the lock /var/lib/dpkg/lock error on Linux is very simple to solve. Follow the steps to resolve the could not get the lock /var/lib/dpkg/lock error.
First, open the Terminal on the Ubuntu desktop and type the following command and press Enter.
sudo rm /var/lib/dpkg/lock
After applying the above command, try to install the program you tried to install again. If you get the same error again, go to the second step.
In this step, apply the following command in Terminal to force the reconfiguration of Ubuntu packages.
sudo dpkg --configure –a
Try to install the program you want to install in Terminal again. Most likely, the /var/lib/dpkg/lock error will be resolved. If you get the same error again, go to step 3.
This time try to fix the /var/lib/dpkg/ lock error by executing the following commands in Terminal. Then try to set up the program again. As a result, your problem will be resolved.
sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock
How to Fix (E: Unable to lock the administration directory (/var/lib/dpkg/) Error on Ubuntu? – In this article, we have reviewed step by step how to fix /var/lib/dpkg/ on Linux. Thanks for following us!
If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!
Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!