今天是要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即可