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

How to enhance Linux and Unix server security

Network security is a very important topic, and t...

Detailed explanation of JavaScript stack and copy

Table of contents 1. Definition of stack 2. JS st...

Mysql accidental deletion of data solution and kill statement principle

mysql accidentally deleted data Using the delete ...

MySQL query redundant indexes and unused index operations

MySQL 5.7 and above versions provide direct query...

Solve the problem of IDEA configuring tomcat startup error

The following two errors were encountered when co...

Why do code standards require SQL statements not to have too many joins?

Free points Interviewer : Have you ever used Linu...

How to set up scheduled backup tasks in Linux centos

Implementation Preparation # Need to back up the ...

Introduction to the use of this in HTML tags

For example: Copy code The code is as follows: <...

Detailed graphic explanation of sqlmap injection

Table of contents 1. We found that this website m...

Detailed explanation of WeChat Mini Program official face verification

The mini program collected user personal informat...

js development plug-in to achieve tab effect

This article example shares the specific code of ...

Use Docker Compose to quickly deploy ELK (tested and effective)

Table of contents 1. Overview 1.1 Definition 1.2 ...