在安裝python-sphinx時出現Errno 14 Couldn't resolve host,什么東東?
[root@localhost jansson-1.2]# yum install python-sphinx
Loaded plugins: fastestmirror
http://yum.loway.ch/RPMS/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.loway.ch; Unknown error"
Trying other mirror.
http://mirrors.cqu.edu.cn/CentOS/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cqu.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.tuna.tsinghua.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.neusoft.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.163.com/centos/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.163.com; Unknown error"
Trying other mirror.
http://mirror.bit.edu.cn/centos/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.bit.edu.cn; Unknown error"
Trying other mirror.
http://mirror.lzu.edu.cn/centos/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.lzu.edu.cn; Unknown error"
Trying other mirror.
一眼一看就知道是網絡的問題,是不是沒設置DNS,檢查下果然是。
注意:
在CentOS 7下不要直接修改/etc/resolv.conf,而是應該使用Systemctl restart NetworkManager命令,它會根據/etc/sysconfig/network-scripts/ifcfg-eth0自動生成etc/resolv.conf。