yum nginx 安装时错误 Errno 14 Couldn't resolve host 解决办法

简介: <p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"> <span style="font-size:18px">在安装mlocate的时候发现一直报错,错误内容大致如下</span></p> <p style="color:rgb(54,46,43); font-fami
+关注继续查看

在安装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完成



原因:
 dns服务器没有配置正确

解决办法:
1、打开文件/etc/resolv.conf在其中添加:
 nameserver 8.8.8.8
 nameserver 8.8.4.4
 search localdomain

2、然后重启网卡:使用命令: service network restart


目录
相关文章
|
4天前
|
Ubuntu 应用服务中间件 Linux
百度搜索:蓝易云【总结Nginx的安装、配置与设置开机自启?】
完成上述步骤后,Nginx将安装并配置好,并设置为开机自启。您可以根据需要修改Nginx的配置文件以适应特定的服务器需求,例如添加站点配置、SSL证书等。在修改配置文件后,记得重新加载Nginx以使更改生效。
14 1
|
4天前
|
应用服务中间件 Linux 网络安全
|
4天前
|
Java 应用服务中间件 Linux
linux安装jdk1.8 +nginx +springboot 实现通过nginx80转发8888端口访问springboot程序
linux安装jdk1.8 +nginx +springboot 实现通过nginx80转发8888端口访问springboot程序
35 0
|
4天前
|
JavaScript 应用服务中间件 nginx
|
4天前
|
关系型数据库 MySQL 应用服务中间件
Nginx、Mysql8、Openjdk11/17安装
Nginx、Mysql8、Openjdk11/17安装
713 2
Nginx、Mysql8、Openjdk11/17安装
|
14天前
|
Ubuntu 应用服务中间件 编译器
nginx的安装、配置、及使用方式
nginx的安装、配置、及使用方式
|
14天前
|
负载均衡 应用服务中间件 nginx
docker安装nginx并配置
docker安装nginx并配置
39 0
|
19天前
|
应用服务中间件 nginx
如何安装Nginx
如何安装Nginx
37 0
|
21天前
|
网络协议 应用服务中间件 Linux
LINUX安装nginx详细步骤(CentOS)
LINUX安装nginx详细步骤(CentOS)
82 0
|
27天前
|
应用服务中间件 Linux 网络安全
手把手教你Linux下安装nginx
手把手教你Linux下安装nginx
60 0
相关产品
云迁移中心
推荐文章
更多