Ubuntu12.04 how to accidentally delete the dpkg folder

Source: Internet
Author: User
Install ubuntu12.04 there today. it is always stuck when flash is installed, and it cannot be switched off. it is only mandatory. However, the dpkg lock error is always reported if you disable it and install it again. The solution is as follows: Ubuntu

The error is as follows:


Copy codeThe code is as follows:
Reading the package list... error!
E: unable to open the file/var/lib/dpkg/status-open (2 does not have this file or directory)
E: unable to parse or open the package list or status file

Delete the entire dpkg folder accidentally. The sudo-get command is useless. I tried a lot of methods and couldn't do it. I went to the ubuntu Forum and saw the post I posted a few years ago. The result was correct. I will summarize it here.

1. go to the link http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/to download the corresponding version.
2. the command is used here.


Copy codeThe code is as follows:
$ Su
Password :*****
# Ar x dpkg_version_arch.deb
# Mv data.tar.gz/data.tar.gz
# Cd/
# Tar xzfv data.tar.gz
Step 3: # rm/var/lib/dpkg/status
Step 4: # cp/var/backups/dpkg. status.0/var/lib/dpkg/status

Finally OK.

Related Article

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.