如何关闭树莓派上Ubuntu在安装软件包时对内核版本等进行的检查?
摘要:参考 https:serverfault.comquestions1101391disable-ubuntu-22-04s-scaning-processes-candidates-after-package-upgrades 现
参考
https://serverfault.com/questions/1101391/disable-ubuntu-22-04s-scaning-processes-candidates-after-package-upgrades
现象
树莓派上装了ubuntu server版,每次装完软件都会看到下面的日志:
Processing triggers for dbus (1.14.10-1ubuntu1) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
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.
解决
修改/etc/apt/apt.conf.d/99needrestart,把下面的内容注释掉:
root@raspberrypi:/etc/apt/apt.conf.d# cat 99needrestart
# needrestart - Restart daemons after library updates.
#
# Call needrestart after package upgrades/installations and check
# for pending service restarts. Should only be triggered if there
# was no error during installation.
#
# DPkg::Post-Invoke {"test -x /usr/lib/needrestart/apt-pinvoke && /usr/lib/needrestart/apt-pinvoke || true"; };
