参考
现象
树莓派上装了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"; };