【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            轉自:http://blog.51cto.com/oldcat1981/1719825   今天在linux環境通過yum安裝軟件報了以下錯誤: [root@multi-mysql yum.repos.d]# yum install ncurses devel -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile 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  從字面意義上看是不能解析mirrorlist.centos.org這個地址,應該是跟dns網絡配置有關系,最后解決方法是在DNS域名解析的配置文件增加DNS服務器的IP地址:  [root@multi-mysql ~]# vim /etc/resolv.conf nameserver 8.8.8.8 nameserver 202.106.0.20  注:我只寫了第一句就可以了……  重啟網絡服務 [root@multi-mysql ~]# /etc/init.d/network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining if ip address 192.168.1.202 is already in use for device eth0... [ OK ]  重新yum安裝,正常 [root@multi-mysql ~]# yum install nmap -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.com base | 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 Process Resolving Dependencies --> Running transaction check ---> Package nmap.x86_64 2:5.51-4.el6 will be installed --> Finished Dependency Resolution ......此處省略  
 
                        
                        
                        轉載于:https://www.cnblogs.com/wangjuns8/p/8270017.html
總結
以上是生活随笔為你收集整理的【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 今天一早来打开IDEA,全面飘红,所有的
 - 下一篇: Flask == scoped_s