安装软件时的报错信息
[root@localhost ~]# yum install -y gcc gcc-c++ zlib zlib-devel openssl openssl-devel pcre pcre-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
然后修改epel.repo文件
vim /etc/yum.repo.d/epel.repo
将所有baseurl前面的“#”去掉,mirrorlist前面的”#”加上。
再次安装时依然报错
[root@localhost ~]# yum install -y gcc gcc-c++ zlib zlib-devel openssl openssl-devel pcre pcre-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
http://download.fedoraproject.org/pub/epel/6/i386/repodata/repomd.xml: [Errno 14] problem making ssl connection
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
yum clean all 后,再安装错误依旧。
解读报错信息,发现是baseurl的下载mirror有问题。
将baseurl的地址换成了“http://mirrors.163.com/centos/6/os/$basearch/”
如下:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
baseurl=http://mirrors.163.com/centos/6/os/$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
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
到此问题解决。
网友评论