好运人生 發表於 2025-8-4 16:06:00

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

<p>在Debian 10 系统中,执行&nbsp;sudo apt update 报错:</p>
<div class="cnblogs_code">
<pre>忽略:<span style="color: rgba(128, 0, 128, 1)">1</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster InRelease</span>
忽略:<span style="color: rgba(128, 0, 128, 1)">2</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian-security buster/updates InRelease</span>
忽略:<span style="color: rgba(128, 0, 128, 1)">3</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster-updates InRelease</span>
错误:<span style="color: rgba(128, 0, 128, 1)">4</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster Release</span>
<span style="color: rgba(128, 0, 128, 1)">404</span>Not Found
错误:</span><span style="color: rgba(128, 0, 128, 1)">5</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian-security buster/updates Release</span>
<span style="color: rgba(128, 0, 128, 1)">404</span>Not Found
错误:</span><span style="color: rgba(128, 0, 128, 1)">6</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster-updates Release</span>
<span style="color: rgba(128, 0, 128, 1)">404</span>Not Found
正在读取软件包列表... 完成
E: 仓库 “http:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster Release” 没有 Release 文件。</span>
<span style="color: rgba(0, 0, 0, 1)">N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt</span>-secure(<span style="color: rgba(128, 0, 128, 1)">8</span><span style="color: rgba(0, 0, 0, 1)">) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian-security buster/updates Release” 没有 Release 文件。</span>
<span style="color: rgba(0, 0, 0, 1)">N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt</span>-secure(<span style="color: rgba(128, 0, 128, 1)">8</span><span style="color: rgba(0, 0, 0, 1)">) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/debian buster-updates Release” 没有 Release 文件。</span>
<span style="color: rgba(0, 0, 0, 1)">N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt</span>-secure(<span style="color: rgba(128, 0, 128, 1)">8</span>) 手册以了解仓库创建和用户配置方面的细节。</pre>
</div>
<p>原因是由于Debian官方将Debian10(Debian buster)软件源由默认站点deb.debian.org移至存档站点archive.debian.org,基于官方软件源的镜像站同步了这一修改, 导致20250723之前的Debian10镜像在运行apt update命令时会报错:&nbsp;buster Release 404 Not Found&nbsp;。&nbsp;</p>
<p>解决方法是:<strong>切换至Debian归档仓库(维持Buster)</strong></p>
<p>适用场景:需保留Debian 10环境,不升级系统。</p>
<p><strong>步骤:</strong></p>
<p>1、修改镜像源为官方归档地址:</p>
<div class="cnblogs_code">
<pre>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</pre>
</div>
<p>或者阿里云镜像软件源</p>
<div class="cnblogs_code">
<pre>deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian buster main contrib non-free</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian buster main contrib non-free</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian-security buster/updates main contrib non-free</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian-security buster/updates main contrib non-free</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian buster-updates main contrib non-free</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/debian-archive/debian buster-updates main contrib non-free</span></pre>
</div>
<p>&nbsp;</p>
<p>2、更新并安装软件:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">sudo</span><span style="color: rgba(0, 0, 0, 1)"> apt update
</span><span style="color: rgba(0, 0, 255, 1)">sudo</span> apt <span style="color: rgba(0, 0, 255, 1)">install</span> &lt;软件包名&gt; --allow-unauthenticated# 忽略证书警告</pre>
</div>
<p>&nbsp;</p><br><br>
来源:https://www.cnblogs.com/rnckty/p/19021679
頁: [1]
查看完整版本: Debian 10 执行 sudo apt update 报错的解决办法