无法通过 apt-get upgrade 在我的 Raspberry PI 4 上升级 Ubuntu 21.10。以下是完整日志:
ubuntu@ubuntu:~$ sudo apt-get upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
fwupd linux-headers-raspi linux-image-raspi linux-raspi
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.140ubuntu6.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.13.0-1017-raspi (5.13.0-1017.19) ...
Failed to create symlink to vmlinuz-5.13.0-1016-raspi: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.13.0-1017-raspi (--configure):
installed linux-image-5.13.0-1017-raspi package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.13.0-1016-raspi (5.13.0-1016.18) ...
Failed to create symlink to vmlinuz-5.13.0-1016-raspi: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.13.0-1016-raspi (--configure):
installed linux-image-5.13.0-1016-raspi package post-installation script subprocess returned error exit status 1
Setting up flash-kernel (3.104ubuntu5) ...
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.13.0-1017-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.13.0-1017-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
ln: failed to create symbolic link '/boot/dtb-5.13.0-1017-raspi': Operation not permitted
dpkg: error processing package flash-kernel (--configure):
installed flash-kernel package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.140ubuntu6.1) ...
ln: failed to create hard link '/boot/initrd.img-5.13.0-1017-raspi.dpkg-bak' => '/boot/initrd.img-5.13.0-1017-raspi': Operation not permitted
update-initramfs: Generating /boot/initrd.img-5.13.0-1017-raspi
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.13.0-1017-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.13.0-1017-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
ln: failed to create symbolic link '/boot/dtb-5.13.0-1017-raspi': Operation not permitted
run-parts: /etc/initramfs/post-update.d//flash-kernel 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
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-5.13.0-1017-raspi
linux-image-5.13.0-1016-raspi
flash-kernel
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
我看到的主要错误:无法创建到...的符号链接:操作不允许在...
有以下日志sudo apt-cache search linux-headers
:
ubuntu@ubuntu:~$ sudo apt-cache search linux-headers
linux-headers-5.13.0-19 - Header files related to Linux kernel version 5.13.0
linux-headers-aws - Linux kernel headers for Amazon Web Services (AWS) systems.
linux-headers-generic - Generic Linux kernel headers
linux-headers-generic-hwe-20.04 - Generic Linux kernel headers
linux-headers-generic-hwe-20.04-edge - Generic Linux kernel headers
linux-headers-oracle - Linux kernel headers for Oracle systems.
linux-headers-virtual - Virtual Linux kernel headers
linux-headers-virtual-hwe-20.04 - Virtual Linux kernel headers
linux-headers-virtual-hwe-20.04-edge - Virtual Linux kernel headers
linux-libc-dev - Linux Kernel Headers for development
linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling)
linux-source-5.13.0 - Linux kernel source for version 5.13.0 with Ubuntu patches
linux-virtual - Minimal Generic Linux kernel and headers
linux-virtual-hwe-20.04 - Minimal Generic Linux kernel and headers
linux-virtual-hwe-20.04-edge - Minimal Generic Linux kernel and headers
linux-headers-5.13.0-1005-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1008-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1008-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-19-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-19-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-generic-64k - Generic 64K Linux kernel headers
linux-headers-generic-64k-hwe-20.04 - Generic 64K Linux kernel headers
linux-headers-generic-64k-hwe-20.04-edge - Generic 64K Linux kernel headers
linux-headers-raspi - Raspberry Pi Linux kernel headers
linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-amd64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-i386-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-riscv64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-x32-cross - Linux Kernel Headers for development (for cross-compiling)
linux-headers-5.13.0-20 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-21 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-22 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-23 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-25 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-27 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-28 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-30 - Header files related to Linux kernel version 5.13.0
linux-headers-5.13.0-35 - Header files related to Linux kernel version 5.13.0
linux-headers-azure - Linux kernel headers for Azure systems.
linux-headers-5.13.0-1006-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1007-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1008-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1009-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1009-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1009-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1010-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1010-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1011-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1011-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1011-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1012-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1012-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1013-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1013-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1014-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1014-azure - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1015-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1015-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1016-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1016-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1017-aws - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1017-azure - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1017-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1018-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1020-raspi - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-1021-oracle - Oracle Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-20-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-20-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-21-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-21-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-22-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-22-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-23-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-23-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-25-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-25-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-27-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-27-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-28-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-28-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-30-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-30-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-35-generic - Linux kernel headers for version 5.13.0 on ARMv8 SMP
linux-headers-5.13.0-35-generic-64k - Linux kernel headers for version 5.13.0 on ARMv8 SMP
如何解决这个问题?
答案1
现在,我不是 Raspberry Pi 专家,但我相信
sudo apt-get install raspberrypi-kernel-headers
它应该在这里有用。上述命令应该会为您的 Raspberry Pi 安装所有依赖项。否则,请考虑发布命令的输出,以及apt-get update && apt-get upgrade
和的输出apt-cache search linux-headers
。