1

When i do a

apt-get upgrade

i get

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-image-3.16.0-4-amd64 : Depends: initramfs-tools (>= 0.110~) but it is not installed or
                                   linux-initramfs-tool
                          Recommends: firmware-linux-free (>= 3~) but it is not installed
                          Recommends: irqbalance but it is not installed

When i then try

apt-get -f install

It tells me

Selecting previously unselected package initramfs-tools.
dpkg: warning: files list file for package 'perl-base' missing; assuming         package has no files currently installed
dpkg: warning: files list file for package 'gcc-4.8-base:amd64' missing;    assuming package has no files currently installed
dpkg: warning: files list file for package 'perl-modules' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'findutils' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package `liberror-perl' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

How can i fix this? I tried uninstalling those packages. Did not help because i cant.

felix m
  • 11

1 Answers1

2

Your package database seems to be badly messed up. You should re-install the affected packages:

apt-get --reinstall install perl-base gcc-4.8-base perl-modules perl findutils liberror-perl initramfs-tools

You can add any others which turn up in error messages.

If liberror-perl is too messed up for apt-get to work, try:

wget http://ftp.de.debian.org/debian/pool/main/libe/liberror-perl/liberror-perl_0.17-1.1_all.deb
dpkg -i liberror-perl_0.17-1.1_all.deb

although if the last "fatal error" in dpkg really is as bad as it sounds, you'll need to do the above from a rescue system (mount your file systems under /mnt in the rescue system, then run dpkg --root=/mnt -i liberror-perl_0.17-1.1_all.deb).

Stephen Kitt
  • 434,908
  • I encountered the error message in the original question today after attempting apt-get dist-upgrade with jessie-backports in sources.list. I removed jessie-backports from the sources.list and ran the apt-get --reinstall install .... System now updates successfully. – RobertL Jul 04 '19 at 19:06
  • @RobertL that’s unrelated to the issues here; see this answer for details. – Stephen Kitt Jul 04 '19 at 20:45