在centos 7上安装epel源后,更新yum缓存或者安装软件就会出现如下错误
问题原因
百度了以下,这是因为epel仓库默认使用的https.
解决方法1:
centos 7
yum clean all
yum --disablerepo=epel -y update ca-certificates
centos 6
yum clean all
yum --disablerepo="epel" update nss
结果无效…(对一些小伙伴有效)
解决方法2:
重建rpm数据库
rpm --rebuilddb
对我依旧无效…(小伙伴们可以试试)
不能放弃,接着来…
解决方法3:
将https转为http
既然不能用https的仓库,那就直接使用http吧,epel也正好支持http+https两种方式。
sed -i 's#https://#http://#g' /etc/yum.repos.d/epel*repo
嚯~ 问题终于解决了,希望可以帮到小伙伴们.