使用 sudo apt-get update 命令时出现 Certificate verification failed: The certificate is NOT trusted.
命令:
sudo apt-get update
问题:Certificate verification failed: The certificate is NOT trusted. Try installing ca-certificates.
忽略:1 https://professional-store-packages.chinauos.com/appstore eagle InRelease 错误:3 https://professional-store-packages.chinauos.com/appstore eagle Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 8.136.212.49 443] 忽略:4 https://professional-packages.chinauos.com/printer eagle InRelease 忽略:2 https://professional-packages.chinauos.com/desktop-professional eagle InRelease 错误:6 https://professional-packages.chinauos.com/printer eagle Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 8.136.212.49 443] 错误:5 https://professional-packages.chinauos.com/desktop-professional eagle Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 8.136.212.49 443] 正在读取软件包列表... 完成 W: https://professional-store-packages.chinauos.com/appstore/dists/eagle/InRelease: No system certificates available. Try installing ca-certificates. W: https://professional-store-packages.chinauos.com/appstore/dists/eagle/Release: No system certificates available. Try installing ca-certificates. E: 仓库 “https://professional-store-packages.chinauos.com/appstore eagle Release” 不再含有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: https://professional-packages.chinauos.com/printer/dists/eagle/InRelease: No system certificates available. Try installing ca-certificates. W: http://professional-packages.chinauos.com/desktop-professional/dists/eagle/InRelease: No system certificates available. Try installing ca-certificates. W: https://professional-packages.chinauos.com/printer/dists/eagle/Release: No system certificates available. Try installing ca-certificates. E: 仓库 “https://professional-packages.chinauos.com/printer eagle Release” 不再含有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: http://professional-packages.chinauos.com/desktop-professional/dists/eagle/Release: No system certificates available. Try installing ca-certificates. E: 仓库 “http://professional-packages.chinauos.com/desktop-professional eagle Release” 不再含有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
解决:
1. 从 Ubuntu 存储库手动下载包ca-certificates。你可以使用 wget 下载它
wget --no-check-certificate http://security.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20230311ubuntu0.20.04.1_all.deb
2. 运行
dpkg -r --force-depends ca-certificates
以删除没有内容的旧包和最终文件。
3. 运行
dpkg -i ca-certificates/ca-certificates_20230311ubuntu0.20.04.1_all.deb
以安装软件包。
这应该使你在证书方面或多或少地处于一个干净的状态。
未来读者注意:不要使用wget
上面的命令;从 packages.ubuntu.com查找适用于你的 Ubuntu 版本的最新软件包。这些事情确实发生了变化。
参考:https://www.nuomiphp.com/a/serverfault/zh/6222ca083089ac36901903e9.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· AI Agent开发,如何调用三方的API Function,是通过提示词来发起调用的吗