Linux error cannot get lock/var/lib/dpkg/lock solution

Source: Internet
Author: User


Take: http://security.kali.org kali/updates/contrib Sources [B]
Get: http://security.kali.org kali/updates/non-free Sources [B]
Get: http://security.kali.org kali/updates/main amd64 Packages [351 KB]
Get: http://security.kali.org kali/updates/contrib amd64 Packages [B]
Get: http://security.kali.org kali/updates/non-free amd64 Packages [B]
Download 17.3 MB, time consuming 54 seconds (KB/S)
E: Unable to get lock/var/lib/dpkg/lock–open (11: Resource is temporarily unavailable)
E: Unable to lock the admin directory (/var/lib/dpkg/), is there another process taking it?


—————————————————————————-

This occurs mainly because of an error in the software update or installation.

Delete two temporary files

sudo rm/var/lib/dpkg/lock

sudo rm/var/cache/apt/archive/lock

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.