提笔画夕阳 發表於 2023-6-24 16:33:00

【Debian】更换阿里源出现的Certificate问题解决方法

<table>
<thead>
<tr>
<th style="text-align: center">系统</th>
<th style="text-align: center">版本</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center">Debian</td>
<td style="text-align: center">11</td>
</tr>
</tbody>
</table>
<h3 id="源配置">源配置</h3>
<pre><code>deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
</code></pre>
<p>我们可以看到使用的是<code>https</code>协议</p>
<h3 id="问题描述">问题描述</h3>
<p>然而修改好配置时,进行<code>sudo apt-get update</code>报错:</p>
<pre><code>Reading package lists... Done
W: https://mirrors.aliyun.com/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/debian/dists/bullseye-updates/InRelease: No system certificates available. Try installing ca-certificates.
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification.
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye-updates/InReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.Could not handshake: Error in the certificate verification.
W: Some index files failed to download. They have been ignored, or old ones used instead.
</code></pre>
<p>出现安全证书不信任的问题</p>
<h3 id="解决办法">解决办法</h3>
<p>有三种解决办法,使用其一即可。</p>
<ol>
<li>把<code>https</code>协议换成<code>http</code>协议</li>
<li>先安装certificate库(安装命令为<code>sudo apt install ca-certificates</code>),再修改成阿里云的源地址。有一种不配源怎么安装,不安装怎么配源的死锁感😂</li>
<li>使用中科大的源,因为他们在这使用的是<code>http</code>协议。</li>
</ol><br><br>
来源:https://www.cnblogs.com/zyinworld/p/17501290.html
頁: [1]
查看完整版本: 【Debian】更换阿里源出现的Certificate问题解决方法