linux下yum错误:[Errno 14] problem making ssl connection Trying other mirror.

所有的base 都要取消注释 mirrorlist 加上注释
另外所有的enable都要设为零

今天是要yum命令安装EPEL仓库后

yum install epel-release

突然发现yum安装其他的软件出错。

错误:
[Errno 14] problem making ssl connection Trying other mirror.
Trying other mirror
Error: Cannot retrieve repository metadata (repomd.xml) for repository: xxxx. Please verify its path and try again

于是去网上查了查,发现许多解决方法。似乎是ssl证书的原因,最终选择

复制代码
[root@redhat2 ~]# cd /etc/yum.repos.d/
[root@redhat2 yum.repos.d]# ls
CentOS6-Base-163.repo  epel.repo(修改他)  epel-testing.repo
[root@redhat2 yum.repos.d]# pwd
/etc/yum.repos.d
[root@redhat2 yum.repos.d]# 
复制代码

vim /etc/yum.repos.d/epel.repo

复制代码
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
复制代码

将baseurl注释去掉,为mirrorlist加上注释。然后将enabeld=1变为0,禁用ssl证书验证。

找到了两种方法(都使用了):

yum install ca-certificates
yum update curl

然后再将enable设置为1即可

作者:山上有风景
欢迎任何形式的转载,但请务必注明出处。
限于本人水平,如果文章和代码有表述不当之处,还请不吝赐教。

分类: 其他知识
<div id="blog_post_info">
1
0
关注  |  顶部  |  评论
<div class="clear"></div>
<div id="post_next_prev">

<a href="https://www.cnblogs.com/ssyfj/p/9176015.html" class="p_n_p_prefix">« </a> 上一篇:    <a href="https://www.cnblogs.com/ssyfj/p/9176015.html" title="发布于 2018-06-13 08:56">linux下sudo命令</a>
<br>
<a href="https://www.cnblogs.com/ssyfj/p/9179587.html" class="p_n_p_prefix">» </a> 下一篇:    <a href="https://www.cnblogs.com/ssyfj/p/9179587.html" title="发布于 2018-06-13 20:06">linux下安装shellinabox实现web登录服务器</a>
发布了255 篇原创文章 · 获赞 7 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/kyle1314608/article/details/104251544