在控制台中运行“apt dist-upgrade”后,如何回答“应该重启哪些服务?”?

在控制台中运行“apt dist-upgrade”后,如何回答“应该重启哪些服务?”?

apt dist-upgrade在 Ubuntu Server 22.04.3 中以 root shell运行后,有时Which services should be restarted?会出现此问题。例如:

Restarting services...
Daemons using outdated libraries
--------------------------------

  1. dbus.service  2. [email protected]  3. multipathd.service  4. networkd-dispatcher.service  5. packagekit.service  6. polkit.service  7. ssh.service  8. systemd-logind.service  9. systemd-manager  10. thermald.service  11. unattended-upgrades.service  12. [email protected]  13. none of the above

(Enter the items or ranges you want to select, separated by spaces.)

Which services should be restarted? 1-13

Which services should be restarted? 1 - 13

Which services should be restarted? 1..13

Which services should be restarted? 1 .. 13

Which services should be restarted? 1...13

Which services should be restarted? 1 ... 13

Which services should be restarted? 1 to 13

Which services should be restarted? 1 2 3 4 5 6 7 8 9 10 11 12 13

Which services should be restarted? 1,2,3,4,5,6,7,8,9,10,11,12,13

Which services should be restarted?

在这个提示中我得到的唯一答案是输入一个数字,它只会重新启动一个服务然后退出。例如:

Which services should be restarted? 1

 /etc/needrestart/restart.d/dbus.service
Service restarts being deferred:
 systemctl restart [email protected]
 systemctl restart multipathd.service
 systemctl restart networkd-dispatcher.service
 systemctl restart packagekit.service
 systemctl restart polkit.service
 systemctl restart ssh.service
 systemctl restart systemd-logind.service
 /etc/needrestart/restart.d/systemd-manager
 systemctl restart thermald.service
 systemctl restart unattended-upgrades.service
 systemctl restart [email protected]

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.
root@ubuntu-server:~#

我该如何回答这个提示来重新启动所有(或多个选择的)服务?

答案1

您是否意识到选项 13 是none of the above?意思是,如果您想重新启动任何其他项目,则不应将其包括在内?

因此,只需省略选项 13 即可:

Which services should be restarted? 1 2 3 4 5 6 7 8 9 10 11 12

或者因为范围也是可以接受的:

Which services should be restarted? 1-12

相关内容