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.

5
  • Does /var/lib/dpkg/info contain anything? – Stephen Kitt Feb 28 '17 at 11:17
  • Yes. Quiet a lot... – felix m Feb 28 '17 at 11:21
  • what gives grep -P -r '^[ \t]*[^#[ \t]+' /etc/apt/sources.list /etc/apt/sources.list.d/* – user192526 Feb 28 '17 at 11:27
  • what is the output of apt-cache policy initramfs-tools ? – GAD3R Feb 28 '17 at 11:38
  • initramfs-tools: Installed: (none) Candidate: 0.120+deb8u2 Version table: 0.120+deb8u2 0 500 ftp2.de.debian.org/debian jessie/main amd64 Packages – felix m Feb 28 '17 at 12:35
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).

2
  • 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 4 '19 at 19:06
  • @RobertL that’s unrelated to the issues here; see this answer for details. – Stephen Kitt Jul 4 '19 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.