Centos Yum Exception problem

Source: Internet
Author: User
Tags gpg

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.