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