如何处理ubuntu22.04LTS安装过程中出现“Daemons using outdated libraries”提示

Ubuntu 22.04 LTS 中使用命令行升级软件或安装任何新软件时,您可能收到"Daemons using outdated libraries","Which services should be restarted?"的提示,提示下面列出备选的重启服务,如下。

使用以下命令,能够修复此类问题。

(1)安装 needrestart

默认情况下,needrestart 已经安装在 Ubuntu 中。如果没有,您可以使用以下命令安装。

复制代码
 sudo apt install needrestart 

(2)显示所有应重新启动的服务

使用以下命令行显示应重新启动哪些服务。

复制代码
sudo needrestart -b

(3)检查并重新启动

现在检查并重新启动服务应使用下面编写的命令重新启动。

复制代码
sudo needrestart -u NeedRestart::UI::stdio -r l
sudo needrestart -u NeedRestart::UI::stdio -r a

(4)重启服务器

复制代码
 reboot

(5)确认

重启服务器后,确认重新启动的服务的变化。

复制代码
sudo needrestart -b

再次确认一下needrestart的状态。

复制代码
sudo needrestart -u NeedRestart::UI::stdio -r l

如下,即正常。

(6)总结

下表总结了上述使用的命令。

|-------------------------------------------------|-----------------------------|
| 命令 | 描述 |
| sudo apt install needrestart | 在 ubuntu 中安装 needrestart 服务 |
| sudo needrestart -b | 以机器可读格式显示需要重新启动的服务内容 |
| sudo needrestart -u NeedRestart::UI::stdio -r l | 以人类可读格式显示需要重新启动的服务内容 |
| sudo needrestart -u NeedRestart::UI::stdio -r a | 重启服务器 |
| reboot | 重启服务器 |

相关推荐
星恒随风19 小时前
从0实现C++ AI大模型接入SDK(十):DataManager业务实现——数据库CRUD、事务管理与数据一致性
linux·服务器·jvm·数据库·c++
qetfw20 小时前
Debian 部署 Discuz!:运行环境、数据库与安装验收
linux·运维·数据库·debian
心之王者7161 天前
【Linux】多线程:从线程控制、同步互斥到经典并发模型
linux·运维·服务器
Doctor_Strange_DML1 天前
图像编辑模型服务部署过程记录
linux·缓存·docker·ai
笔记本note1 天前
Linux 文件系统与设备文件
linux·服务器·文件系统
无足鸟ICT1 天前
【RHCA+】_proc_pid_cmdline
linux·运维·服务器
学以智用1 天前
CentOS Linux 文件操作详解
linux
饿了吃洗衣凝珠2 天前
shell循环
linux·运维·服务器
代码不停2 天前
Linux基础知识
java·linux·数据库
东风微鸣2 天前
Linux台式机也能指纹识别登录验证啦
linux·指纹