Shawn's blog Shawn's blog
About Me
  • Category
  • Tag
  • Archive
GitHub (opens new window)

Shawn Jin

I am not a creator of knowledge, I am just a porter of knowledge.
About Me
  • Category
  • Tag
  • Archive
GitHub (opens new window)
  • APT package Management Lock error

Shawn Jin
2019-02-02
studyingnotes

APT package Management Lock error

# Could not get Lock error

When using Ubuntu, we contact with apt package management tool every day. However, sometimes we may encounter the problem Could not get lock...(11: Resource temporarily unavailable)

When we encounter this problem, we need to check if the system is updating, or the apt is running somewhere. If it is, just wait until the process done. Or else, we could use other methods to resolve the apt multithread errors.

Error: $ E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
1

1: usually this happens due to some process is using APT package management tool.

Method : rm /var/lib/dpkg/lock-frontend sudo dpkg --configure -a

The first method would fix the problem for you in most cases. But my case was a bit different. I was updating my system and accidentally closed the terminal. For that reason, there were no processes running apt, but it still showed me the error.

In this case, I just use sudo rm /var/lib/dpkg/lock to remove the lock file.

Then apt could be used right now

REFERENCE: https://itsfoss.com/could-not-get-lock-error/

#apt#Ubuntu
Updated: 2021/09/09, 11:40:27
最近更新
01
Python import files from different directories
12-31
02
Classmethod in Python
09-15
03
Single/Double Star (/*) Parameters in Python
09-15
更多文章>
Theme by Vdoing | Copyright © 2019-2021 Shawn Jin | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式