天空闲话 发表于 2024-8-15 18:18:22

ubuntu 24.04实行apt-get update报错处理

今天在做Ubuntu 24.04更新时,突然跳出两个报错,这在之前还从未碰到过,处理过程记录和分享一下:
一、apt-get update报错内容

报错截图参考如下:
https://i-blog.csdnimg.cn/direct/ff4c7cf5796c40d2baf192d6d3495310.png
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease                                                   
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease                                  
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 c-n-f Metadata
Fetched 132 kB in 1s (176 kB/s)         
Reading package lists... Done
我们可以看到,有两条服务启动失败的服务:
Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
二、办理启动失败的服务

在这里有必要增补一下这两项服务分别是什么?


[*]apt-news.service 是一个系统服务,用于定期从官方 Ubuntu 新闻源获取新闻和更新信息。该服务会周期性地从官方服务器下载最新的 Ubuntu 新闻和公告。当有新的新闻或公告时,它可能会通过桌面通知或其他方式提醒用户。在某些情况下,当用户实行系统更新时,apt-news.service 也会被触发,以便用户相识有关更新的紧张信息。
[*]esm-cache.service 是一个与 Ubuntu 的 Extended Security Maintenance (ESM) 相干的服务。ESM 是 Canonical 提供的一项服务,旨在为已结束标准支持的 Ubuntu 版本继续提供安全更新和其他维护支持。
apt-news.service对我们现实使用帮助并大,我们可以不用剖析。但是如果 你想要办理这个报错,可以参考如下方法举行处理。
sudo apt update
sudo apt install ubuntu-news-tools
安装完成后,您可以实行启动该服务并将其设置为开机启动:
sudo systemctl start apt-news.service
sudo systemctl enable apt-news.service
esm-cache.service对于大多数时候,也并不必要,但是如果你觉得有必要订阅提醒,可以安装这个服务,方法参考如下:
sudo apt update
sudo apt install esm-client
安装完成后,同样必要启动该服务并将其设置为开机启动:
sudo systemctl start esm-cache.service
sudo systemctl enable esm-cache.service
总结来说,esm-cache和apt-news 这两个服务都不影响系统的正常使用,只是Ubuntu官方新增的两项功能,可以视情况决定是否使用。必要注意:ESM 通常必要有效的订阅才气使用,esm-cache.service 会帮助管理与认证相干的证书和授权信息。
保举阅读



[*] Windows 11安装Ubuntu 实战教程
[*] 【Linux】在Windows WSL (Linux的Windows子系统)上运行的Ubuntu如何更改主机名
[*] 易记笔记-Ubuntu升级软件包及注意事项
[*] Ubuntu 多路径服务报错处理方法
[*] Ubuntu 用bind9搭建DNS服务器

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: ubuntu 24.04实行apt-get update报错处理