Yum Error Error:cannot find a valid baseurl for repo:base

Source: Internet
Author: User
Tags echo command

CentOS Yum Error Error:cannot find a valid baseurl for Repo:addons has a CentOS 6.5 and the following error message appears when using Yum.

[email protected] ~]# Yum install Lrzsz
Loaded Plugins:fastestmirror
Determining fastest Mirrors
Could not retrieve mirrorlist Http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14:pycurl ERROR 6-"couldn ' t resolve Host ' mirrorlist.centos.org '"
Error:cannot find a valid baseurl for repo:base



Then ping mirrorlist.centos.org found the ping to be out of the way. The suspicion is a DNS setup issue. Ping www.ctohome.com also appears unknown host www.ctohome.com error. Try again and occasionally ping, indicating that DNS is indeed a problem. So, let's modify the DNS configuration:

Vi/etc/resolv.conf

Sweat, found VI also can not be used. Install VI? Yum is not available, so Yum installs VI (how does the Linux/centos system use Yum to install Vi/vim?). What do we do?

Thinking, in fact, we just need to modify the/etc/resolv.conf file, directly a DNS server can, think of the echo command:

echo "NameServer 8.8.8.8" >>/etc/resolv.conf

Done, ping www.baidu.com smooth, yum can use! The first thing to do is to remove the DNS server that has the problem in/etc/resolv.conf.


Yum Error Error:cannot find a valid baseurl for repo:base

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.