我最近尝试apt-get dist-upgrade -t jessie-backports
安装新的 Debian Jessie。它给了我以下信息:
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?
当我运行时apt-get dist-upgrade -t jessie-backports --fix-missing
,我没有注意并注意到它计划删除大量软件包,包括 Xserver,因为以前从未发生过这种情况。当我再次尝试安装 X 时,我得到了以下信息:
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.
当我运行时apt-get -f install
,我收到另一个错误告诉我运行apt-get autoremove
,这删除了更多的软件包,但我仍然遇到相同的错误,所以我运行了apt-get install initramfs-tools
。现在,当我尝试使用apt
安装 X 或进行 dist-upgrade 或其他任何操作时,我得到以下信息:
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)
尽管引用了3.16.0-4
,uname -r
给了我4.9.0-0.bpo.2-amd64
。我尝试重新启动,认为 3.16 内核处于活动状态并且重新启动将使用 4.9,但没有运气,我遇到了相同的错误。我不知道我做了什么或如何解决它。