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

Summary of relevant knowledge points of ajax in jQuery

Preface Students who learn JavaScript know that A...

Full analysis of Vue diff algorithm

Table of contents Preface Vue update view patch s...

How to enable the slow query log function in MySQL

The MySQL slow query log is very useful for track...

An in-depth introduction to React refs

1. What is Refs is called Resilient File System (...

Summary of things to pay attention to in the footer of a web page

Lots of links You’ve no doubt seen a lot of sites ...

Why web page encoding uses utf-8 instead of gbk or gb2312?

If you have a choice, you should use UTF-8 In fac...

Linux system command notes

This article describes the linux system commands....

Detailed explanation of Linux mpstat command usage

1. mpstat command 1.1 Command Format mpstat [ -A ...

Vue implements irregular screenshots

Table of contents Image capture through svg CSS p...

Detailed tutorial on installation and configuration of MySql 5.7.17 winx64

1. Download the software 1. Go to the MySQL offic...

vue.js downloads pictures according to picture url

Recently, when I was working on a front-end vue.j...

JavaScript setTimeout and setTimeinterval use cases explained

Both methods can be used to execute a piece of ja...

Implementing a simple calculator with javascript

This article example shares the specific code of ...