Fix couldn ' t resolve host ' mirrorlist.centos.org

Source: Internet
Author: User



This error is caused mainly because the environment can not read the Yun caused by the/etc/sysconfig/network-scripts/ifcfg-eth0 configuration may be considered an error caused by the network. Or the DNS configuration of the/etc/resolv.conf error. Or you can consider the Yum cache effect (yum clean all)









(Below is to find more useful information online)



Today, in the Linux environment, the following error was reported through the Yum installation software:


[[email protected] yum.repos.d]# yum install ncurses devel -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: PYCURL ERROR 6 - "Couldn‘t resolve host ‘mirrorlist.centos.org‘"Error: Cannot finda valid baseurl forrepo: base


In a literal sense, it is not possible to parse mirrorlist.centos.org this address, should be related to DNS network configuration, the final solution is to increase the DNS server IP address in the DNS domain name resolution configuration file:


[[email protected] ~]# vim /etc/resolv.confnameserver 8.8.8.8nameserver 202.106.0.20


Restart Network Service


[[email protected] ~]# /etc/init.d/network restartShutting down interface eth0:                              [  OK  ]Shutting down loopback interface:                          [  OK  ]Bringing up loopback interface:                            [  OK  ]Bringing up interface eth0:  Determining ifip address 192.168.1.202 is already inuse fordevice eth0...                                                           [  OK  ]


Re-install Yum, normal


[[email protected] ~]# yum install nmap -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.combase                                                                                                         | 3.7 kB     00:00     base/primary_db| 4.6 MB     00:01     extras                                                                                                       | 3.4 kB     00:00     extras/primary_db|  33 kB     00:00     updates                                                                                                      | 3.4 kB     00:00     updates/primary_db| 2.6 MB     00:00     Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package nmap.x86_64 2:5.51-4.el6 will be installed--> Finished Dependency Resolution......此处省略


Fix couldn ' t resolve host ' mirrorlist.centos.org


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.