Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that Ubuntu sudo apt-get update cannot get a lock and cannot lock a directory?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

The main content of this article is to explain "how to solve the problem that Ubuntu sudo apt-get update cannot get a lock and cannot lock a directory." interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the problem that Ubuntu sudo apt-get update can't get a lock and can't lock a directory.

Question:

Encountered while updating resource sudo apt-get update

E: unable to acquire lock / var/lib/apt/lists/lock-open (11: resource temporarily unavailable)

E: unable to lock directory / var/lib/apt/lists/

Solution:

(1) sudo rm / var/lib/apt/lists/lock

(2) ps aux # list the current process list. Find the process that is hosted by apt-get and write down PID.

Sudo kill PID is fine.

At this point, I believe that everyone has a deeper understanding of "how to solve the problem that Ubuntu sudo apt-get update cannot obtain a lock and cannot lock a directory." you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report