yum 安裝時錯誤 Errno 14 Couldn't resolve host 解決辦法

在安裝mlocate的時候發現一直報錯,錯誤內容大致如下

Downloading Packages:
http://mirrors.163.com/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'"Trying other mirror.
http://mirrors.aliyun.com/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"Trying other mirror.
http://centos.ustc.edu.cn/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.ustc.edu.cn'"Trying other mirror.
http://mirrors.yun-idc.com/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.yun-idc.com'"Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"Trying other mirror.
http://mirror01.idc.hinet.net/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror01.idc.hinet.net'"Trying other mirror.
http://ftp.stust.edu.tw/pub/Linux/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.stust.edu.tw'"Trying other mirror.
http://ftp.twaren.net/Linux/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.twaren.net'"Trying other mirror.
http://ftp.isu.edu.tw/pub/Linux/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.isu.edu.tw'"Trying other mirror.
http://ftp.stu.edu.tw/Linux/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.stu.edu.tw'"Trying other mirror.

Error Downloading Packages:
  mlocate-0.22.2-4.el6.i686: failure: Packages/mlocate-0.22.2-4.el6.i686.rpm from base: [Errno 256] No more mirrors to try.


後來網上查了一下說是DNS服務器錯誤。於是修改一下 /etc/resolv.conf

添加一個nameserver 8.8.8.8完成




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章