Debian 10 执行 sudo apt update 报错的解决办法

在Debian 10 系统中,执行 sudo apt update 报错:

忽略:1 http://mirrors.ustc.edu.cn/debian buster InRelease
忽略:2 http://mirrors.ustc.edu.cn/debian-security buster/updates InRelease
忽略:3 http://mirrors.ustc.edu.cn/debian buster-updates InRelease
错误:4 http://mirrors.ustc.edu.cn/debian buster Release
  404  Not Found [IP: 202.38.95.110 80]
错误:5 http://mirrors.ustc.edu.cn/debian-security buster/updates Release
  404  Not Found [IP: 202.38.95.110 80]
错误:6 http://mirrors.ustc.edu.cn/debian buster-updates Release
  404  Not Found [IP: 202.38.95.110 80]
正在读取软件包列表... 完成
E: 仓库 “http://mirrors.ustc.edu.cn/debian buster Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.ustc.edu.cn/debian-security buster/updates Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.ustc.edu.cn/debian buster-updates Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

原因是由于Debian官方将Debian10(Debian buster)软件源由默认站点deb.debian.org移至存档站点archive.debian.org,基于官方软件源的镜像站同步了这一修改, 导致20250723之前的Debian10镜像在运行apt update命令时会报错: buster Release 404 Not Found 。 

解决方法是:切换至Debian归档仓库(维持Buster)

适用场景:需保留Debian 10环境,不升级系统。

步骤:

1、修改镜像源为官方归档地址:

deb https://archive.debian.org/debian buster main contrib non-free
deb-src https://archive.debian.org/debian buster main contrib non-free
deb https://archive.debian.org/debian-security buster/updates main contrib non-free
deb-src https://archive.debian.org/debian-security buster/updates main contrib non-free
deb https://archive.debian.org/debian buster-updates main contrib non-free
deb-src https://archive.debian.org/debian buster-updates main contrib non-free

或者阿里云镜像软件源

deb https://mirrors.aliyun.com/debian-archive/debian buster main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian buster main contrib non-free
deb https://mirrors.aliyun.com/debian-archive/debian-security buster/updates main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian-security buster/updates main contrib non-free
deb https://mirrors.aliyun.com/debian-archive/debian buster-updates main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian buster-updates main contrib non-free

 

2、更新并安装软件:

sudo apt update
sudo apt install <软件包名> --allow-unauthenticated  # 忽略证书警告

 

posted @ 2025-08-04 16:06  贱书生  阅读(615)  评论(0)    收藏  举报