linux yum 出现errno 14,【CentOS7】yum安裝時出現錯誤Errno 14 Couldn't resolve host的解決辦法...

在安裝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。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值