[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

corrupt/lost dpkg files, dpkg broken, aptitude broken, help :(



I had some filesystem corruption.  The last thing I did before the
machine hard locked was to install lshw.  lshw is what hard locked the
system.  Let's save the filesystem journaling discussion for another day
and focus on the matter at hand.

Anyway, at least one dpkg file entry was damaged and the inodes moved to
lost+found during a manual fsck.  After the system was back up, I tried
to remove lshw, and got this error:

dpkg: failed to open package info file `/var/lib/dpkg/available' for
reading: No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install.  Trying to recover:
dpkg: failed to open package info file `/var/lib/dpkg/available' for
reading: No such file or directory

So, 'available' was moved to lost+found I presume.

-rwxr-xr-x  1 root root 580K Jul 25  2009 #2081643
-rw-r--r--  1 root root 2.0K Jul 25  2009 #2099976
-rw-r--r--  1 root root 2.3K Jul 25  2009 #215571
-rw-r--r--  1 root root 1021 Jul 25  2009 #215572
-rw-r--r--  1 root root  246 Jul 25  2009 #417800
-rw-r--r--  1 man  root 1.1M Jun  7 12:37 #442478

Contents of one file looks probable for available.  Two others are the
copyright file for lshw, #215572, and an md5sum file, #417800:

99209571e9d387313b895fb7e5bd3f1c  usr/bin/lshw
33f91b9e03614e52ee5b312b9557eef1  usr/share/man/man1/lshw.1.gz
2a2b28847f54ec7ea484996d7e8318e2  usr/share/doc/lshw/changelog.Debian.gz
aed23aa18cbf326e7ce43e7e539357b6  usr/share/doc/lshw/copyright

What's the best method for fixing this, getting dpkg running again, and
removing lshw, given some of its file have been corrupted/lost?  There
wouldn't happen to be a single command to rebuild the dpkg subsystem
would there?

Thanks a bunch.  Oh, please CC me so I don't miss a reply in all the
list posts.

-- 
Stan


Reply to: