Reputation: 169
Preconfiguring packages ...
Selecting previously unselected package libc-ares2.
(Reading database ... 85%dpkg: unrecoverable fatal error, aborting:
files list file for package `linux-headers-3.2.0-58-generic' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)
this is ubuntu with amd64 dual boot with win7. this error seems to have started when i tryed to use sun jdk instead of open jdk. thanks, tim
Upvotes: 0
Views: 1910
Reputation: 523
This problem happens when a file list of a package gets corrupt. to fix:
cd /var/lib/dpkg/info
sudo rm {package with problems}.list
in your case {package with problems} would be linux-headers-3.2.0-58-generic.
The next time you run dpkg, you will get something like
dpkg: Warning: list file for linux-headers-3.2.0-58-generic are missing package assumed to not be installed
Assuming you don't get any more
files list contains empty filename
errors, you can do
sudo apt-get install {package with problems}
And apt-get install the other files with issues, and your problem should be fixed.
This is the manual way to remove a corrupt list file and reinstall the affected packages.
Edit: you might want to use
sudo apt-get install --reinstall
instead of just
sudo apt-get install
My information might be a bit old because I am using trisquel 7, a derivative of trusty ubuntu, which isn't the total latest, but most of the commands are the same, or just require replacing apt-get
with aptitude
Upvotes: 3
Reputation: 169
you have to open up the status file in the var/lib/dpkg and delete the entry for the whole package that is referenced as failing. http://ubuntuforums.org/archive/index.php/t-1232143.html i also had to aptitude reinstall tzdata-java
Upvotes: 0