当前位置: 首页 > news >正文

apt update Ign and 404 Not Found

1. 环境及目标

环境:在Ubuntu 24.04.1 LTS系统上通过virt-manager启动了debian系统,网络为NAT,可以连通互联网


2. 问题描述及原因分析

执行命令

apt update

输出如下信息:

Ign:1 http://mirrors.ustc.edu.cn/debian buster InRelease
Err:2 http://mirrors.ustc.edu.cn/debian buster Release404  Not Found [IP: 218.104.71.170 80]
Reading package lists... Done
E: The repository 'http://mirrors.ustc.edu.cn/debian buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

怀疑是网络问题,进行了ping测试,网络正常能ping通,网络没问题。

那只有可能是源的问题了,中途更换过其他源,也是不能正常工作。故怀疑签名可能过期,要在 apt update 时关闭验证:

apt -o Acquire::Check-Valid-Until=false update

执行结果如下:

Get:1 http://mirrors.ustc.edu.cn/debian bullseye InRelease [75.1 kB]
Get:2 http://mirrors.ustc.edu.cn/debian-security bullseye-security InRelease [27.2 kB]
Err:1 http://mirrors.ustc.edu.cn/debian bullseye InReleaseThe following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 605C66F00D6C9793
Err:2 http://mirrors.ustc.edu.cn/debian-security bullseye-security InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
Reading package lists... Done                                                  
W: GPG error: http://mirrors.ustc.edu.cn/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D
386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 605C66F00D6C9793
E: The repository 'http://mirrors.ustc.edu.cn/debian bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.ustc.edu.cn/debian-security bullseye-security InRelease: The following signatures couldn't be verified because the public key is not available: 
NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
E: The repository 'http://mirrors.ustc.edu.cn/debian-security bullseye-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

在错误很明确:缺少 Debian Bullseye 的签名公钥。APT 默认会校验 Release 文件签名,文件系统里面GPG key 太老了,Bullseye 的 key 不存在,所以报 NO_PUBKEY。

手动导入公钥:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8

3. 解决方案

手动导入公钥:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8
http://www.dtcms.com/a/344022.html

相关文章:

  • docker cuda版安装 dockercuda版安装
  • 哪款云手机比较好用呢?
  • 链式法则解释上游梯度应用
  • 《Windows Server 2022》 [2025年8月版 ] [官方IOS] 下载
  • 设计模式:抽象工厂模式
  • DeepSeek辅助编写的测试xlsx文件写入性能的程序
  • 多线程下为什么用ConcurrentHashMap而不是HashMap
  • Python万里长征6(非教程)pandas筛选数据三基础、三核心、三高级
  • Kafka 为什么具有高吞吐量的特性?
  • C# 浮点数与定点数详细解析
  • 邀请函 | 2025达索系统高峰论坛,跨界融合定义未来制造
  • SamOutVXP:革命性轻量级语言模型,突破传统推理限制
  • 不同类型代理 IP 在爬虫场景下的表现对比
  • 苹果紧急修复ImageIO零日漏洞CVE-2025-43300,已被在野利用
  • 开源AI编程工具Kilo Code的深度分析:与Cline和Roo Code的全面对比
  • QT之QSS常用颜色总结
  • 【黑客技术零基础入门】计算机网络---子网划分、子网掩码和网关(非常详细)零基础入门到精通,收藏这一篇就够了
  • 【每天一个知识点】AIOps 与自动化管理
  • 二、高可用架构(Nginx + Keepalived + MySQL 主从)
  • 集成算法(聚类)
  • Vue生命周期以及自定义钩子和路由
  • Manus AI 与多语言手写识别技术全解析
  • c++最新进展
  • linux下top命令分析内存不足vs负载过高
  • MeterSphere接口自动化多场景批量运行复制引用
  • 疯狂星期四文案网第47天运营日记
  • 云市场周报 (2025.08.22):阿里云RDS降价、腾讯云Serverless容器新品发布
  • Adobe Photoshop 2025 版本介绍与使用指南
  • AE下载安装教程(附安装包)Adobe Media Encoder超详细图文安装教程
  • Azure TTS Importer:一键导入,将微软TTS语音接入你的阅读软件!