Ubuntu E: unable to acquire lock / var/lib/dpkg/lock-frontend-open (11: resource temporarily unavailable)
Ubuntu 18.04, the same with other versions of Ubuntu
Question:
When running sudo apt-get install/update/ or other commands, the following prompts sometimes appear for various ambiguous reasons:
E: unable to acquire lock / var/lib/dpkg/lock-frontend-open (11: resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/ var/lib/dpkg/lock-frontend), is another process using it?
The reason for this problem may be:
Under the Ubuntu system terminal, when installing software with apt-get install, if the terminal is forcibly closed without completing the download. The apt-get process may not end at this point. As a result, if you run the apt-get install command again to install the software, an error like this occurs. That is, another program is occupying the apt-get install process, because when it is running, it will occupy the system lock when the software source is updated (referred to as the "system update lock"), and the resource is locked.
So, in the first way, we just need to kill the previous process and release the system lock:
Ps-e | grep apt-get
Display
5873? 00:00:01 apt-get
And then execute
Sudo kill 5873
The second method is to force unlocking.
Password for linuxidc@linuxidc:~$ sudo rm / var/cache/apt/archives/lock [sudo] linuxidc: linuxidc@linuxidc:~$ sudo rm / var/lib/dpkg/lock
Summary
The above is the Ubuntu E: unable to get lock / var/lib/dpkg/lock-frontend-open (11: resources are temporarily unavailable). I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!