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