Debian系统无法升级的一个原因
<p>我用WSL安装了Debian 12 系统,无法升级,出现以下错误:</p><div class="cnblogs_code">
<pre>yong@DESKTOP-D1TMKU9:~<span style="color: rgba(0, 0, 0, 1)">$ sudo apt update
Ign:</span><span style="color: rgba(128, 0, 128, 1)">1</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">2</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">3</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">4</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">1</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">2</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">3</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">4</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">1</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">2</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">3</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease</span>
Ign:<span style="color: rgba(128, 0, 128, 1)">4</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease</span>
Err:<span style="color: rgba(128, 0, 128, 1)">1</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease</span>
Certificate verification failed: The certificate <span style="color: rgba(0, 0, 255, 1)">is</span> NOT trusted. The certificate issuer <span style="color: rgba(0, 0, 255, 1)">is</span> unknown.Could not handshake: Error <span style="color: rgba(0, 0, 255, 1)">in</span> the certificate verification.
Err:</span><span style="color: rgba(128, 0, 128, 1)">2</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease</span>
Certificate verification failed: The certificate <span style="color: rgba(0, 0, 255, 1)">is</span> NOT trusted. The certificate issuer <span style="color: rgba(0, 0, 255, 1)">is</span> unknown.Could not handshake: Error <span style="color: rgba(0, 0, 255, 1)">in</span> the certificate verification.
Err:</span><span style="color: rgba(128, 0, 128, 1)">3</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease</span>
Certificate verification failed: The certificate <span style="color: rgba(0, 0, 255, 1)">is</span> NOT trusted. The certificate issuer <span style="color: rgba(0, 0, 255, 1)">is</span> unknown.Could not handshake: Error <span style="color: rgba(0, 0, 255, 1)">in</span> the certificate verification.
Err:</span><span style="color: rgba(128, 0, 128, 1)">4</span> https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease</span>
Certificate verification failed: The certificate <span style="color: rgba(0, 0, 255, 1)">is</span> NOT trusted. The certificate issuer <span style="color: rgba(0, 0, 255, 1)">is</span> unknown.Could not handshake: Error <span style="color: rgba(0, 0, 255, 1)">in</span> the certificate verification.
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
W: https:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates.</span>
W: Failed to fetch https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification. </span>
W: Failed to fetch https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification. </span>
W: Failed to fetch https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification. </span>
W: Failed to fetch https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification. </span>
W: Some index files failed to download. They have been ignored, or old ones used instead.</pre>
</div>
<p>好像是认证出现问题,网上搜了一阵,也没有找到明确的解决方法。无意间扫到在清华源有这么一句话:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:
sudo apt install apt</span>-transport-https ca-certificates</pre>
</div>
<p>于是,打开 /etc/apt/sources.list 把 https 换成 http,再运行 sudo apt update 果然可以了,按照提示安装上述软件,果然可以使用了。</p>
<p>随后,再把 http 改为 https,再次更新,果然没有问题了。</p><br><br>
来源:https://www.cnblogs.com/litifeng/p/17765265.html
頁:
[1]