Could not handshake: Error in the certificate verification.

这篇博客指导如何在Ubuntu中处理https安全证书问题,通过安装ca-certificates包来修复apt-get update时的错误,并给出官方下载地址。

说明

关于这个ubuntu换源这个问题,百度了下也是来自csdn的答案,不幸的是我这里使用csdn但是吐槽资源要积分才能下,我也是无语。所以对于这个问题给个官方的下载地址

解决方案

这个问题是ubuntu换的源用了https,https需要处理安全证书,参考这篇文章
说是要安装ca-certificates,他提供的是csdn的资源,下载不了。官网地址是:
https://launchpad.net/ubuntu/bionic/amd64/ca-certificates/20210119~18.04.2
安装后就可以sudo apt-get update不报错了。源不能用wget或者curl下载deb文件安装就可以。

WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease Ign:5 https://apt.kitware.com/ubuntu bionic InRelease Ign:6 https://deb.nodesource.com/node_16.x nodistro InRelease Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release 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:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates Release 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:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports Release 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:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security Release 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:11 https://apt.kitware.com/ubuntu bionic Release Could not handshake: Error in the pull function. [IP: 66.194.253.25 443] Err:12 https://deb.nodesource.com/node_16.x nodistro Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 104.20.45.190 443] Reading package lists... W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-updates/InRelease: No system certificates available. Try installing ca-certificates. W: https://deb.nodesource.com/node_16.x/dists/nodistro/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-backports/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-security/InRelease: No system certificates available. Try installing ca-certificates. W: https://apt.kitware.com/ubuntu/dists/bionic/InRelease: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic/Release: No system certificates available. Try installing ca-certificates. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release' does not have a Release file. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-updates/Release: No system certificates available. Try installing ca-certificates. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates Release' does not have a Release file. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-backports/Release: No system certificates available. Try installing ca-certificates. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports Release' does not have a Release file. W: https://deb.nodesource.com/node_16.x/dists/nodistro/Release: No system certificates available. Try installing ca-certificates. W: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-security/Release: No system certificates available. Try installing ca-certificates. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security Release' does not have a Release file. W: https://apt.kitware.com/ubuntu/dists/bionic/Release: No system certificates available. Try installing ca-certificates. E: The repository 'https://apt.kitware.com/ubuntu bionic Release' no longer has a Release file. E: The repository 'https://deb.nodesource.com/node_16.x nodistro Release' no longer has a Release file. The command '/bin/sh -c apt update' returned a non-zero code: 100
11-08
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值