zoukankan      html  css  js  c++  java
  • centos6 yum安装软件报错Cannot retrieve repository metadata (repomd.xml) for repository: epel 的解决办法

    报错:centos6 yum安装软件报错Cannot retrieve repository metadata (repomd.xml) for repository: epel 的解决办法

    原因分析:官方已经停止更新centos6相关的源,可以使用其他源替代


    报错信息:
    # yum clean all && yum makecache
    ERROR 22 - "The requested URL returned error: 404 Not Found"
    Trying other mirror.
    To address this issue please refer to the below knowledge base article

    https://access.redhat.com/articles/1320623

    If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again


    解决办法:
    1.修改基础repo

    sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo 
    yum clean all
    yum makecache

    2.修改epel repo
    vim /etc/yum.repos.d/epel.repo
    enabled=1 改为 enabled=0
    贴一下具体的repo内容,系统是cetos6.10,可以根据情况进行修改

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

    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    baseurl=http://mirrors.aliyun.com/epel/6/$basearch
    failovermethod=priority
    enabled=0
    gpgcheck=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
     
    [epel-debuginfo]
    name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
    baseurl=http://mirrors.aliyun.com/epel/6/$basearch/debug
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    gpgcheck=0
     
    [epel-source]
    name=Extra Packages for Enterprise Linux 6 - $basearch - Source
    baseurl=http://mirrors.aliyun.com/epel/6/SRPMS
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    gpgcheck=0

    cat /etc/yum.repos.d/CentOS-Base.repo

    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the 
    # remarked out baseurl= line instead.
    #
    #
     
    [base]
    name=CentOS-6.10 - Base - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
     
    #released updates 
    [updates]
    name=CentOS-6.10 - Updates - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
     
    #additional packages that may be useful
    [extras]
    name=CentOS-6.10 - Extras - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
     
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-6.10 - Plus - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
     
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-6.10 - Contrib - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
  • 相关阅读:
    # 抗战电视剧《河山》观后感 #
    SAP MM 自定义条件类型出现在采购信息记录的'条件'界面里 ?
    SAP 对HU做转库操作,系统报错
    SAP MM 采购订单与相关合同的价格差异问题分析
    2019年终总结之SAP项目实践篇
    大学教师,要做教授,请不要做叫兽!
    SAP MM 一个含有多个账号分配对象的行项目的PO及其收货
    华哥演技好!--- 电视剧《魔都风云》观后感
    SAP 如何看某个TR是否传入了Q或者P系统?
    Linux IO 模型
  • 原文地址:https://www.cnblogs.com/reblue520/p/15539122.html
Copyright © 2011-2022 走看看