安装epel源出现错误报码:14: curl#6 - “Could not resolve host: mirrorlist.centos.org; 未知的错误“

出现报错

[root@server1 ~]# yum install -y epel-release
已加载插件:fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
base                                                                      | 3.6 kB  00:00:00     
local                                                                     | 3.6 kB  00:00:00     
Determining fastest mirrors
没有可用软件包 epel-release。
错误:无须任何处理

解决方案

[root@server1 ~]# yum -y install wget
[root@server1 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@server1 ~]# yum clean all
[root@server1 ~]# yum makecache
[root@server1 ~]# yum install -y epel-release
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-11 将被 安装
--> 解决依赖关系完成

依赖关系解决

=================================================================================================
 Package                    架构                 版本                 源                    大小
=================================================================================================
正在安装:
 epel-release               noarch               7-11                 extras                15 k

事务概要
=================================================================================================
安装  1 软件包

总下载量:15 k
安装大小:24 k
Downloading packages:
警告:/var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
epel-release-7-11.noarch.rpm 的公钥尚未安装
epel-release-7-11.noarch.rpm                                              |  15 kB  00:00:00     
从 http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) "
 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 来自       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : epel-release-7-11.noarch                                                     1/1 
  验证中      : epel-release-7-11.noarch                                                     1/1 

已安装:
  epel-release.noarch 0:7-11                                                                     

完毕!

成功

你可能感兴趣的:(报错解决方案,linux,运维)