Ubuntu E: Unable to obtain lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

Ubuntu E: Unable to obtain lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

Ubuntu 18.04, other versions of Ubuntu

question:

When running sudo apt-get install/update/or other commands, the following prompt may appear for various unclear reasons:

E: Unable to obtain 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?

Ubuntu E: Unable to get lock /var/lib/dpkg/lock-frontend - open

This problem may be caused by:

In the Ubuntu system terminal, when using apt-get install to install software, if the terminal is forcibly closed before the download is completed. The apt-get process may not be finished at this time. As a result, if you run the apt-get install command again to install the software, the above error will appear. That is, another program is occupying the apt-get install process. Because it is running, it will occupy the system lock for software source updates (referred to as 'system update lock'), and the resources are locked at this time.

So, in the first method , we just need to kill the previous process and release the system lock:

ps -e|grep apt-get

show

5873 ? 00:00:01 apt-get

Then execute

sudo kill 5873

The second method is to force unlock

linuxidc@linuxidc:~$ sudo rm /var/cache/apt/archives/lock
[sudo] linuxidc's password: 
linuxidc@linuxidc:~$ sudo rm /var/lib/dpkg/lock 

Ubuntu E: Unable to get lock /var/lib/dpkg/lock-frontend - open

Summarize

The above is what I introduced to you about Ubuntu E: Unable to get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable). I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed explanation of several domestic update sources for Ubuntu 16.04
  • How to change Alibaba source in Ubuntu 14.04 and Ubuntu 16.04
  • How to configure Ubuntu 17.04 to change the domestic source
  • How to install Python 3.6.0 from source code in Ubuntu 16.04 LTS
  • Solution to Hash Sum mismatch error when using domestic source in Ubuntu
  • How to create local source in Ubuntu
  • Shell script to automatically detect and modify the fastest Ubuntu software source
  • How to change the domestic source of Ubuntu 20.04 apt
  • Share the problem of Ubuntu 19 not being able to install docker source
  • How to modify Ubuntu's source list (source list) detailed explanation

<<:  MySQL 8.0 download and installation configuration graphic tutorial under Windows 10

>>:  JavaScript operation element examples

Recommend

Two ways to use react in React html

Basic Use <!DOCTYPE html> <html lang=&qu...

Realization of real-time file synchronization between Linux servers

Usage scenarios For existing servers A and B, if ...

Detailed explanation of virtual DOM in Vue source code analysis

Why do we need virtual dom? Virtual DOM is design...

Summary of all HTML interview questions

1. The role of doctype, the difference between st...

js implements random roll call

This article shares the specific code of js to im...

Comparing the performance of int, char, and varchar in MySQL

There are many seemingly true "rumors" ...

WeChat applet learning wxs usage tutorial

What is wxs? wxs (WeiXin Script) is a scripting l...

Installing Windows Server 2008 operating system on a virtual machine

This article introduces the installation of Windo...

Vue implements a small weather forecast application

This is a website I imitated when I was self-stud...

Detailed tutorial on MySQL installation and configuration

Table of contents Installation-free version of My...

The difference between name and value in input tag

type is the control used for input and output in t...

Chinese website user experience rankings

<br />User experience is increasingly valued...

HTML table_Powernode Java Academy

To draw a table in HTML, use the table tag tr me...