During the package update routine (apt update && apt upgrade) I faced with an error:
The following packages have unmet dependencies:
linux-image-cloud-arm64 : Depends: linux-image-5.10.0-0.bpo.8-cloud-arm64 (= 5.10.46-4~bpo10+1) but 5.10.46-2~bpo10+1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
If I run the suggested command I get the following error:
Unpacking linux-image-5.10.0-0.bpo.8-cloud-arm64 (5.10.46-4~bpo10+1) over (5.10.46-2~bpo10+1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-0.bpo.8-cloud-arm64_5.10.46-4~bpo10+1_arm64.deb (--unpack):
unable to make backup link of './boot/System.map-5.10.0-0.bpo.8-cloud-arm64' before installing new version: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.10.0-0.bpo.8-cloud-arm64_5.10.46-4~bpo10+1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Here is the list of installed linux images:
ii linux-image-5.10.0-0.bpo.7-cloud-arm64 5.10.40-1~bpo10+1 arm64 Linux 5.10 for arm64 cloud (signed)
ii linux-image-5.10.0-0.bpo.8-cloud-arm64 5.10.46-2~bpo10+1 arm64 Linux 5.10 for arm64 cloud (signed)
rc linux-image-5.9.0-0.bpo.5-cloud-arm64 5.9.15-1~bpo10+1 arm64 Linux 5.9 for arm64 cloud (signed)
iU linux-image-cloud-arm64 5.10.46-4~bpo10+1 arm64 Linux for arm64 cloud (meta-package)
I also tried to run apt install --reinstall linux-image-cloud-arm64, but got the same error
Does anybody know how to fix the issue with linux image update?
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-cloud-arm64 : Depends: linux-image-5.10.0-0.bpo.8-cloud-arm64 (= 5.10.46-4~bpo10+1) but 5.10.46-2~bpo10+1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
as well as apt install --reinstall linux-image-5.10.0-0.bpo.8-cloud-arm64:
Preparing to unpack .../linux-image-5.10.0-0.bpo.8-cloud-arm64_5.10.46-4~bpo10+1_arm64.deb ...
Unpacking linux-image-5.10.0-0.bpo.8-cloud-arm64 (5.10.46-4~bpo10+1) over (5.10.46-2~bpo10+1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-0.bpo.8-cloud-arm64_5.10.46-4~bpo10+1_arm64.deb (--unpack):
unable to make backup link of './boot/System.map-5.10.0-0.bpo.8-cloud-arm64' before installing new version: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.10.0-0.bpo.8-cloud-arm64_5.10.46-4~bpo10+1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have found some information here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1318951
They recommend to boot into another installed image, purge the defective one and reinstall it. But I do not know how to boot Pi into another image. Also, adding lines
do_symlinks = No
no_symlinks = Yes
to /etc/kernel-img.conf did nothing (but I didn’t reboot the Pi afterwards)
hmm I’m wonder why you have linux-image-cloud-arm64 package installed at all. Usually it is used on cloud platforms supporting arm64 virtual machines. As well it is installed from Buster backports indicated by bpo10 within the package name. Was there any reason to have it installed?
Usually an Raspberry Pi, kernel from Raspbian repository is used and not a kernel for cloud platform.
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================-==============-============-=================================
un debian-kernel-handbook <none> <none> (no description available)
un kernel-common <none> <none> (no description available)
ii raspberrypi-kernel 1:1.20210805-1 arm64 Raspberry Pi bootloader
UPD. I didn’t find any v.5 images except for cloud and backports available:
Luckily this cloud VM kernel is not loaded by the physical RPi anyway. These would never be automatically installed by any other Debian package or any of our software options, but indeed one output line indicated that it was pulled as dependency by another APT package, a 3rd party package most likely:
That list should then show the culprit package which for strange reasons has that cloud kernel package as dependency.
That is a kernel for e.g. ESXi on ARM guests, actually good to know about it. Also I’ll just test linux-image-cloud-amd64 on our supported VMs, as it is much smaller than the regular x86_64 kernel .
Thank you for the advice!
I have executed the command and this was the output:
# apt purge linux-image-5.10.0-0.bpo.7-cloud-arm64 linux-image-5.10.0-0.bpo.8-cloud-arm64 linux-image-5.9.0-0.bpo.5-cloud-arm64 linux-image-cloud-arm64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
cpio initramfs-tools initramfs-tools-core klibc-utils libklibc linux-base
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-5.10.0-0.bpo.7-cloud-arm64* linux-image-5.10.0-0.bpo.8-cloud-arm64* linux-image-5.9.0-0.bpo.5-cloud-arm64* linux-image-cloud-arm64*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 163 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
Strange, nothing else would be purged. Not sure why the package has the “automatic” mark then. However, so you can confirm to purge them and also remove the other packages those pulled again as dependency, like the initramfs, which is not required on RPi:
I have purged all the linux-image* packages you mentioned + their dependencies (via --autoremove) and updated DietPi to 7.5.2.
Everything works fine! Thank you!!!
The case is now resolved. How can I mark it?