在CentOS 6.3 x86_64下安装php-mcrypt的时候出现了问题:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again,需要安装epel源。

解决方法: 一句话:把/etc/yum.repos.d/epel.repo,文件第3行注释去掉,把第四行注释掉。具体如下:

打开/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 需要的包

如果还是不行,修改DNS,到/etc/resolv.conf下添加一下:

nameserver 8.8.8.8
search localdomain

然后重启network服务:service network restart

yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again的更多相关文章

  1. 运行yum报错Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    今天给Centos通过rpm -Uvh装了个epel的扩展后,执行yum就开始报错: Error: Cannot retrieve metalink for repository: epel. Ple ...

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

    在Centos 5.x或6.x上安装RHEL EPEL Repo repository,资源库,源的意思.RHEL EPEL(Extra Packages for Enterprise Linux)  ...

  3. 运行yum报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path

    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again 当我们安装第三方扩 ...

  4. Cannot retrieve metalink for repository: epel. Please verify its path and try again

    今天在测试环境使用yum安装,遇到一个问题: Error: Cannot retrieve metalink for repository: epel. Please verify its path ...

  5. Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    # yum install -y vim Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfil ...

  6. 安装Nginx报错“Cannot retrieve metalink for repository: epel. Please verify its path and try again”

    CentOS 6.5中通过yum安装nginx报错. 搜了一下,很多都是修改某个配置文件的.但是在StackOverFlow的某个问题下,有人回答说修改配置文件并不是一个好的方法,虽然我采用了这个人的 ...

  7. centos7 升级php7 添加配置epel源 报错:Cannot retrieve metalink for repository: epel. Please verify its path and try again

    文章来自:循序渐渐linux:基础知识 一书 7.3章LAMP服务器搭建 日常故障 centos上好多软件升级需要配置epel源 其中有一点小插曲 需要手动更改 1.很多时候,对PHP环境要求较新的版 ...

  8. yum安装epel库后,安装软件总是提示Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again(无法检索epel仓库)

    解决方法: vi /etc/yum.repos.d/epel.repo 将baseurl中的注释取消,将mirrorlist该列注释掉即可. 附图如下:

  9. yum Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    今天使用yum时出现如上问题,解决办法: 1.编辑:/etc/yum.repos.d/epel.repo 将baseurl的注释取消, mirrorlist注释掉,如图:

随机推荐

  1. 快速切换IP的批处理!

    内容如下: @echo off color 1A Title [SMART专用 IP设置V1.0] cls echo. echo SMART专用 IP设置V1.0 %date%%time% echo. ...

  2. R语言 recommenderlab 包

    recommend li_volleyball 2016年3月20日 library(recommenderlab) ## Warning: package 'recommenderlab' was ...

  3. 如何打开xip格式的xcode安装包

    解决方法如下: 1.保证存储空间 20G 2.去除解压验证 xattr -d com.apple.quarantine Xcode_8_beta.xip 3.双击解压 详见: 从官网下载的 xcode ...

  4. 第2月第4天 injection plugin for xcode

    http://www.cocoachina.com/ios/20140530/8623.html http://www.jianshu.com/p/27be46d5e5d4

  5. sja1000芯片can驱动程序

    应用层使用socketCan的方法:http://pan.baidu.com/s/1ntsvbb7#path=%252Floongson1%252Ftools%252Fcan 功能:对can驱动程序的 ...

  6. 非阻塞SOCKET套接字connect等待时间的实现

     SOCKET cClient;     cClient=socket(AF_INET,SOCK_STREAM,0);     //设置为非阻塞套接字     int iMode = 1;     i ...

  7. zabbix 3.0.4 Nginx 性能监控

    搭建Nginx 安装pcre-devel .zlib-devel支持包 [root@test /]# yum -y install pcre-devel zlib-devel 创建nginx用户 [r ...

  8. iOS开发——UI进阶篇(九)block的巧用

    前面有提到通知.代理.kvo等方法来协助不同对象之间的消息通信,今天再介绍一下用block来解决这个问题 接着前面的例子 这里将功能在复述一遍 我把用block和通知放在一起比较,当然代理和kvo如何 ...

  9. inner join ,left join ,right join 以及java时间转换

    1.inner join ,left join 与 right join (from 百度知道) 例表aaid adate1    a12    a23    a3表bbid  bdate1     ...

  10. linux kernel 平台总线实例分析

    linux 平台总线的实现有三大块  , platform bus , platform device , platform drvice 平台类型结构体: /** * struct bus_type ...