Linux我用 LinuxLinux学习之路

yum错误Cannot retrieve metalink fo

2019-05-31  本文已影响1人  whisshe

问题详情

最近在一台服务器上安装epel源后,更新yum缓存或者安装软件就会出现如下错误。

错误详情
要解决方法直接翻到最下面

问题原因

上网查了一下,这是因为epel仓库默认使用的https,如下:

解决方法

更新ca-certficates包

按照网上的说法,需要更新ca-certficates包。

yum clean all
yum --disablerepo=epel -y update  ca-certificates
yum clean all
yum --disablerepo="epel" update nss

我试着更新了,还是一样的报错。但是有人这样做就行了

重建rpm数据库

广大人民群众的智慧是无穷的,又找到一个新的方法。

rpm --rebuilddb

试了,还是没什么卵用。

将https转为http

既然不能用https的仓库,那就直接使用http吧,epel也正好支持http+https两种方式。

sed -i 's#https://#http://#g' /etc/yum.repos.d/epel*repo

问题解决了

上一篇 下一篇

猜你喜欢

热点阅读