epel安装第三方扩展源后,运行yum报错的解决方案

yum安装报错:Cannot retrieve metalink for repository: epel. Please verify its path and try again

解决方法: 一句话:把/etc/yum.repos.d/epel.repo,文件baseurl的注释放开,mirrorlist注释掉。

具体如下:

打开/etc/yum.repos.d/epel.repo,将

  1. [epel]
  2. name=Extra Packages for Enterprise Linux 6 - $basearch
  3. #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
  4. mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

修改为

  1. [epel]
  2. name=Extra Packages for Enterprise Linux 6 - $basearch
  3. baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
  4. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

再清理源,重新安装

  1. yum clean all
  2. yum install -y 需要的包
上一篇:Window7上搭建symfony开发环境(PEAR)


下一篇:用C扩展Python3