我最近安装了 debian 12 stable,当我安装时apt upgrade
,我收到 linux-image 错误,下面是完整的回溯。是什么原因导致的以及如何不再收到此错误消息?
naveen@debian12:~$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.142) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.1.0-10-amd64 (6.1.38-2) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-10-amd64.
dkms: autoinstall for kernel: 6.1.0-10-amd64.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-10-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-10-amd64 (--configure):
installed linux-image-6.1.0-10-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-6.1.0-10-amd64 (= 6.1.38-2); however:
Package linux-image-6.1.0-10-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-10-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.1.0-10-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
这是我的消息来源
naveen@debian12:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ bookworm main contrib non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free-firmware
答案1
看起来您已经安装了该raspi-firmware
软件包,其中包含 Raspberry Pi 系列基于 ARM 的单板计算机所需的固件和引导加载程序。然而你的内核有一个-amd64
后缀,表明该系统是常规的 64 位 x86 系统。
显然,该raspi-firmware
包包含一些参与 initramfs 创建的脚本,并且它出错了 - 可能是因为系统没有 ARM 处理器。