通常在工作中,我不会遇到任何与证书相关的错误。但是,当我尝试在家中执行“sudo apt update”、“git clone”、“npm install”等时,会发生错误。我知道这可能与代理有关,但我根本无法解决问题。我想确定地解决这个问题。请帮助我。
Ign:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:1 https://download.docker.com/linux/ubuntu focal InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: ]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/focal/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: ]
W: Some index files failed to download. They have been ignored, or old ones used instead.
我尝试了以下操作,但错误没有解决。转到 /usr/local/share/ca-certificates/。创建一个新文件夹。“sudo mkdir school”将 .crt 文件复制到 school 文件夹。确保权限正常(文件夹权限为 755,文件权限为 644)。运行“sudo update-ca-certificates”。