E:could not get Lock/var/lib/dpkg/lock-open (11:resource temporarily unavailable)

Source: Internet
Author: User

This problem may occur because another program is running, causing the resource to be locked out of service. The reason that the resource was locked may have been the last time that the installation was not completed properly, causing this condition to occur.

Workaround: Enter the following command

sudo rm/var/cache/apt/archives/lock

sudo rm/var/lib/dpkg/lock

After installing the package you want to install, you can solve

While playing Ubuntu today, when updating the source, the following error occurred suddenly:

[1]+ Stopped sudo apt-get update
[Email protected]:~$ sudo apt-get update
E:could not get Lock/var/lib/apt/lists/lock-open (11:resource temporarily unavailable)
E:unable to lock the list directory

Beginning to think is insufficient authority, is to use sudo apt-get update, found or error, the problem is not resolved. So the internet search for a bit, the answer is as follows:

The problem should be that the previous update was forcibly canceled, and the process is still there. Take a look at this command:

Ps-e | grep apt

The results appear as follows:

6362? 00:00:00 Apt

6934? 00:00:00 Apt-get

7368? 00:00:00 synaptic

And then it executes.

sudo killall apt

sudo killall apt-get

sudo killall synaptic

View Ps-e in the terminal again | grep apt doesn't have any results.

Continue with sudo apt-get update

Ok!

Reason: Just installed Ubantu system, the internal lack of many software sources, at this time, the system will automatically start the software source update process "Apt-get", and it will always survive. Because it is running, it consumes the system lock at the time of the software source update (the "System update Lock", which is in the "/var/lib/apt/lists/" directory), and when a new apt-get process is generated, "E: Unable to get the lock" because the system update lock is not available/var/ Lib/apt/lists/lock-open (11:resource temporarily unavailable) "Error prompt! Therefore, we simply kill the original apt-get process and activate the new apt-get process to make the new software manager work properly!

At this point, you can follow the steps to resolve:
1. Enter the following command: "Ps-aux > Temp.txt". Hit Enter to confirm. At this time there will be "warning" appeared, but ignored.
2. Enter the following command: "Grep-n apt-get temp.txt" type Enter to confirm. The PID of the apt-get process is then found from the command output.
3. Enter the following command: "sudo kill <PID>".
4, complete.

Or

If you are prompted with an error: E:could not get Lock/var/lib/dpkg/lock-open (Resource temporarily unavailable)
Input

sudo rm/var/lib/apt/lists/lock

Can

Copy Link:

http://blog.csdn.net/zyxlinux888/article/details/6358615

E:could not get Lock/var/lib/dpkg/lock-open (11:resource temporarily unavailable)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.