我遇到了 CA 证书问题。我尝试访问的每个网站都要求我确认证书,而且我的更新也无法 100% 正常工作
$ sudo rm -rf /etc/ssl/certs/*
$ sudo update-ca-certificates Updating certificates in /etc/ssl/certs... 152 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
$ sudo apt-get update
[...]
Err private-ppa.launchpad.net precise/main amd64 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Err private-ppa.launchpad.net precise/main i386 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Ign private-ppa.launchpad.net precise/main Translation-en_US
Ign private-ppa.launchpad.net precise/main Translation-en
Fetched 1,118 kB in 44s (24.9 kB/s)
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
你运行 时自己删除了所有证书sudo rm -rf /etc/ssl/certs/*
。这会破坏您的系统。您可以采取的修复措施之一是重新安装它们来自的软件包:
sudo apt-get install --reinstall ca-certificates
这应该是相对安全的。如果这不起作用,您可能需要清除软件包并重新安装,但如果您目前有损坏的软件包,请不要尝试这样做。
sudo apt-get -f install
# stop if you saw any errors
sudo dpkg --purge --force-depends ca-certificates
sudo apt-get -f install