Linux系统ca根证书
时间:2023-6-16 14:08 作者:wen 分类: Linux
今天在window11系统下载了一个Linux子系统debian11, 因为需要下载一个vim软件, 自带的apt源下周很慢, 就换了一个阿里云的源.
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
然后就出现了下面问题
root@LAPTOP-7QAJBP6L:~# apt update
Err:1 https://mirrors.aliyun.com/debian bullseye InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:2 https://mirrors.aliyun.com/debian-security bullseye-security InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:3 https://mirrors.aliyun.com/debian bullseye-updates InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:4 https://mirrors.aliyun.com/debian bullseye-backports InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: https://mirrors.aliyun.com/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/debian-security/dists/bullseye-security/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: https://mirrors.aliyun.com/debian/dists/bullseye-backports/InRelease: No system certificates available. Try installing ca-certificates.
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian-security/dists/bullseye-security/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye-updates/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye-backports/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
检查发现是没有安装ca证书, 然后把/etc/apt/sources.list文件还原, 然后运行下面命令
apt install ca-certificates
然后再把源换成阿里云的源.
我在网上看到有的直接把https改为http, 我没试过不知道可不可以用.
标签: linux