Debian repair notes

Source: Internet
Author: User
Debian record-Debian information of the Linux release-details are as follows. Debian is a very old computer installed in the house. It often suffers from hard drive disconnection. I used windows in the past. Now I use it to modify linux. Of course, this is also the case. This is not the case. debian is broken several times.

First, we fixed the file system and started it with the CD rescue. fsck. ext3/dev/hda4. fixed the problem and reported many errors. A bunch of files were broken.

After going in, I found that dpkg is broken, making apt-get, apt-cache and so on unavailable, and reported/var/lib/dpkg/status error. I found this error on the Internet, but there were a bunch of such errors. Some people said they used status-old to copy it back, but unfortunately this file broke down together.

Use recover, repair, and so on to find a bash file that can be repaired:

Http://tuxx-home.at/projects/restore-dpkg-status.sh

After running, a new status file is generated in the tmp directory.

OK, and then it is said that/var/lib/dpkg/available is broken. I looked for it. This time it seems that there is no fixed script, and I found something that can be repaired like this:

Dpkg? Clear-avail
Apt-get update

After running the command, the first sentence is to clear the available file. After update, it is still 0 bytes. The file is cheated.

However, after clearing it, apt-get can be used. However, it also thinks that many of my packages are not in the status of installation.

I had to install the package slowly. It would overwrite the installation and not occupy more space.

For example, run apt-get install openssh-server.

It thought that I didn't install this openssh, so I had to reinstall it for me, so I had to handle a lot of packages, and I had to deal with them slowly. Again.

Finally, I checked it. Combined with the observed phenomenon, I felt that the reason for this broken computer hard disk disconnection was the power supply problem. Maybe the hardware would stop when the power supply was not moving. Try the new power supply in a few days.
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.