The Ubuntu Installation Software prompts "the lock file cannot be opened/var/lib/dpkg/lock ".

Source: Internet
Author: User

When you use apt-get to install make, the system prompts "the lock file cannot be opened/var/lib/dpkg/lock"

# Apt-Get install Vim

E: Unable to open the lock file/var/lib/dpkg/lock-open (2: No file or directory)
E: Unable to lock the Status List Directory (/var/lib/dpkg/). Check whether you are running as a root user?

This problem often occurs because the Write File is not deleted !!

Solution:

Create an empty file and copy it to the appropriate location:

Touch lockcopy lock/var/lib/dpkg

Apt-Get install Vim again

Prompt: e: Unable to open the file/var/lib/dpkg/status-open

In Touch, copy the status file to the corresponding file.

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.