0

I recently tried to apt-get dist-upgrade -t jessie-backports on a new Debian Jessie install. It gave me the following message:

Err http://ftp.debian.org/debian/ jessie-backports/main dh-autoreconf all 12~bpo8+1
  502  Data corruption
E: Failed to fetch http://ftp.debian.org/debian/pool/main/d/dh-autoreconf/dh-autoreconf_12~bpo8+1_all.deb  502  Data corruption

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When I ran apt-get dist-upgrade -t jessie-backports --fix-missing, I did not pay attention and notice it planned to remove a TON of packages, including Xserver, because that has never happened before. When I tried to install X again, I got this:

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
 linux-image-4.9.0-0.bpo.2-amd64 : Depends: initramfs-tools (>= 0.120+deb8u2) but it is not installed or
                                            linux-initramfs-tool
E: Unmet dependencies. Try using -f.

When I ran apt-get -f install, I got another error telling me to run apt-get autoremove, which removed a ton more packages but I still got the same error, so I ran apt-get install initramfs-tools. Now when I try to use apt to install X or do a dist-upgrade or whatever, I get this:

Removing linux-image-3.16.0-4-amd64 (3.16.39-1+deb8u2) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-3.16.0-4-amd64
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.16.0-4-amd64.postrm line 206.
dpkg: error processing package linux-image-3.16.0-4-amd64 (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.16.0-4-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Despite the references to 3.16.0-4, uname -r gives me 4.9.0-0.bpo.2-amd64. I tried rebooting, thinking somehow 3.16 kernel was active and reboot would use 4.9, but no luck, I am getting the same error. I have no idea what I've done or how to fix it.

  • 4
    Oh dear... You've probably broken your installation. Jessie backports isn't a coherent distribution, you shouldn't use it for a dist-upgrade, just for specific package installations. – Stephen Kitt Mar 20 '17 at 16:50
  • Ha, great. Well, I can always reinstall it. Just holding out hope there was some way to fix it. – user5104897 Mar 20 '17 at 16:52
  • 2
    There's probably a way to fix it, but it's probably harder than re-installing (unless you know your way around Debian quite well). – Stephen Kitt Mar 20 '17 at 16:54
  • @StephenKitt I have come across similar problems, for instance lack of space in one server, and it is quite maddening the installation insisting in installing the newer kernel version when you are trying to fix things around. Other than editing the dependency files by hand... – Rui F Ribeiro Mar 20 '17 at 17:45
  • 1
    @StephenKitt Not forcing per se....installation of new kernel aborts due to lack of space, you try to fix things around deleting an older version, and the package manager insists on installing the new kernel version before deleting the old. A very annoying catch-22. – Rui F Ribeiro Mar 20 '17 at 18:04

Your Answer

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

Browse other questions tagged or ask your own question.