When setting up the environment encountered the Yum update problem, reported the following error:
Yumrepo Error:all Mirror URLs is not using FTP, Http[s] or file.
Eg. $releasever is not a valid release or hasnt been released yet/
Removing mirrorlist with no valid mirrors:/var/cache/yum/base/mirrorlist.txt
Error:cannot Retrieve repository metadata (Repomd.xml) for repository:base. Verify its path and try again
There are generally three reasons for analysis:
1. It is possible that the firewall is blocking the outbound HTTP request or FTP request, service iptables status
2. It is possible that the DNS is wrong, unable to parse properly, replace with 8.8.8.8
3. The system does not take the release number
Test the environment using ping www.baidu.com display can ping, stating that there is no problem with DNS, that may be the third reason
You need to modify the *.repo source file to replace the $releasever variable completely to 6.
Vim/etc/yum.repos.d/centos6-base-163.repo
【
[Base]
Name=centos-6-base-163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=os
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#released Updates
[Updates]
Name=centos-6-updates-163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=updates
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#additional packages that could be useful
[Extras]
Name=centos-6-extras-163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6&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-plus-163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6&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-contrib-163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=contrib
Gpgcheck=1
Enabled=0
GPgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
】
Last updated cache: Yum Makecache
Centos Yum Exception problem