WSL2 Ubuntu 22.04 LTS 安装软件包提示 'Failed to retrieve available kernel versions.'
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Failed to retrieve available kernel versions.
Failed to check for processor microcode upgrades.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
All these messages came from needrestart application which purpose is
check which daemons need to be restarted after library upgrades
This application have several modules. The processor microcode module supports only AMD and Intel processors. So it knows nothing about ARM in the RaspberryPi, so it shows the mentioned error message.
sudo apt-get purge needrestart
## or
sudo sed -e 's|^#\$nrconf{ucodehints} = 0|\$nrconf{ucodehints} = 0|g' -i.bak /etc/needrestart/needrestart.conf