原文链接
解决办法
centos
sudo yum install ca-certificates
sudo update-ca-trust extract
Debian
sudo apt-get install --reinstall ca-certificates
PS:如果yum之前清了缓存,更新不了,下面有一个方案即可解决。
暂时关闭SSL检查认证
root@master ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
sslverify=false # 添加此行(跳过ssl认证)
在关闭认证后,可以正常使用yum更新包,注意更新完成后将这行去掉!