Eric Cheng wrote: > > Hi all, > Perhaps after an abnormal shutdown the files list file of dpkg was > damaged. Now I cannot dpkg -i or apt-get install anything. It complained > about "dpkg: error processing <the package I was trying to install> : > files list file for package `libgnome-pilot0' is missing final newline". I > tried to remove this and its dependencies, but it could not remove them. > Now dpkg is completely broken. Is there any means that I can do to repair > or recover the files list file? > > Thanks, > Eric >
You have 2 important files in /var/lib/dpkg :status and available .The status keeps the status(purged,installed....).available is merely listing all packages. They both have backups,namely status-old and available-old . So I would suggest either a cp -f or try the dpkg --merge-avail command . See the manual page and I would suggest to make a copy now of all 4 files in case something goes wrong. I did recover from a corrupted dpkg database once with dpkg --merge-avail so... Note that if you use the cp -f you will have to reinstall whatever packages you installed after the databse got corupted.