解决yum报错:Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify

Posted 刘承c

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决yum报错:Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify相关的知识,希望对你有一定的参考价值。

一、报错信息:

     

二、解决方法:

       1、进入 yum.repos.d文件夹下

           

       2、修改CentOS6-Base-163.repo

           

       3、配置文件,如下:

# 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.5 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6.7/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6.5 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6.7/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.5 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6.7/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.5 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6.7/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.5 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6.7/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

4、测试成功,信息如下:

    





以上是关于解决yum报错:Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify的主要内容,如果未能解决你的问题,请参考以下文章

yum 报错 Error: Cannot find a valid baseurl for repo: base

VMware下centOS yum报错cannot find a valid baseurl or repo:base 解决方法

Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter

CentOS系统yum源使用报错:Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge.(示

yum报错Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-source

使用adb命令报错:error: cannot connect to daemon解决办法