Debian系统无法升级的一个原因
我用WSL安装了Debian 12 系统,无法升级,出现以下错误:
yong@DESKTOP-D1TMKU9:~$ sudo apt update Ign:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease Ign:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease Ign:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease Err:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Err:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Err:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Err:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Reading package lists... Done Building dependency tree... Done All packages are up to date. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease: No system certificates available. Try installing ca-certificates. W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-updates/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/debian/dists/bookworm-backports/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/debian-security/dists/bookworm-security/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] W: Some index files failed to download. They have been ignored, or old ones used instead.
好像是认证出现问题,网上搜了一阵,也没有找到明确的解决方法。无意间扫到在清华源有这么一句话:
Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:
sudo apt install apt-transport-https ca-certificates
于是,打开 /etc/apt/sources.list 把 https 换成 http,再运行 sudo apt update 果然可以了,按照提示安装上述软件,果然可以使用了。
随后,再把 http 改为 https,再次更新,果然没有问题了。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
2019-10-15 vim中常用折叠命令
2017-10-15 Centos下源码安装git
2017-10-15 利用putty的pscp命令上传文件
2017-10-15 更新Bash路径的缓存