CentOS installation software Error:cannot Find a valid baseurl for repo:base

Source: Internet
Author: User
Tags centos nameserver

Today, using Yum to install the software, the following prompts appear:

Loaded Plugins:fastestmirror, Refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve Mirrorlist Http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error is
14:pycurl ERROR 6-"couldn ' t resolve Host ' mirrorlist.centos.org '"
Error:cannot find a valid baseurl for repo:base


Think is Yum source has a problem, changed one or the same, check whether the network, ping the next extranet domain name, found that all ping impassability, directly reported unknown host Www.111cn.net, suspected is the problem of DNS.

Solution:

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

And then ping the extranet domain name, you can resolve, and then to use Yum installation software, you can, well, solve the problem.

The valid parameters and their meanings are as follows:

NameServer indicates the IP address of the DNS server. There can be many rows of nameserver, each with an I-P address. In the order of nameserver in this file, and only when the first nameserver Query the following nameserver when there is no response.
Domain declares the name of the host. Many programs use it, such as the mail system, when there is no domain name for the main
When a DNS query is made, it is also used. If no domain name, host name is used, delete all at the first point (.) The previous content.
Search its multiple parameters indicate the order of the domain name query. When you want to query a host that does not have a domain name, the host will look for it separately in the domain that is declared by search. Domain and search cannot coexist, and if they exist, subsequent occurrences will be used.
Sortlist allows the result of a domain name to be given a specific sort. Its parameters are network/mask pairs. Allow arbitrary order. Red Hat does not provide the default/etc/resolv.conf file, and its contents are dynamically created based on the options given at installation.

Original from: http://blog.slogra.com/post-504.html

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.