1. 程式人生 > >解決 "Could not resolve host: mirrorlist.centos.or

解決 "Could not resolve host: mirrorlist.centos.or

-s ces ifcfg yun color text clean init.d could

解決 "Could not resolve host: mirrorlist.centos.org; 未知的錯誤"

安裝yum報以下錯誤:
技術分享圖片
錯誤引起主要是因為環境讀取不到yun引起的。可以考慮/etc/sysconfig/network-scripts/ifcfg-eth0 配置出錯導致網絡不通。
或者/etc/resolv.conf的DNS配置出錯。或者可以考慮清楚yum緩存影響(yum clean all)
經過嘗試之後,以下步驟解決了我的問題:
vi /etc/resolv.conf
技術分享圖片

nameserver 219.141.136.10
nameserver 219.141.140.10

然後重啟網絡

技術分享圖片
[root@tutu-mongodb04 ~]# /etc/init.d/network restart
再安裝 yum ,就可以了。
技術分享圖片
問題解決。

解決 "Could not resolve host: mirrorlist.centos.or