Ubuntu "unable to obtain lock \ lock" solution

Source: Internet
Author: User
Ubuntu cannot obtain the lock/lock solution. when you add the source and update the source, if the update is interrupted halfway, the following prompt appears when you install the software or update the source again. E: unable to obtain the lock/var/lib/apt/lists/lock & amp; ndash; open (11: the resource is temporarily unavailable... ubuntu "unable to obtain lock \ lock" solution when you add the source and update the source, if the update is interrupted halfway, the following prompt appears when you install the software or update the source again, E: unable to obtain lock/var/lib/apt/lists/lock-open (11: Resource temporarily unavailable) E: the directory/var/lib/apt/lists/cannot be locked. this is because the updated process still exists in the memory. at this time, you need to terminate the process and find out the process first, enter the command "ps-aux" on the terminal and find the process "user pid % CPU % mem vsz rss tty stat start time COMMANDroo" in the output list. T 3545 0.0 0.1 5948 1196? S sudo apt-get uproot 3546 0.0 0.2 8408 2484? S apt-get update as shown above I found the process, where 3545 and 3546 are the process ID, and then enter the command to terminate the two processes: sudo kill 3545 sudo kill 3546 replace the PID you have investigated with 3545 and 3546. if it is still unfortunate, force unlock, command sudo rm/var/cache/apt/archives/locksudo rm/var/lib/dpkg/lockok.

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.