Linux在安装epel-release时,报错epel-release-7-14.noarch.rpm 的公钥尚未安装

Linux在安装epel-release时报错:

[root@XWDBDEV01 ~]# yum install epel-release
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Determining fastest mirrors
base                                                                                                                                                      | 3.6 kB  00:00:00     
epel                                                                                                                                                      | 4.7 kB  00:00:00     
extras                                                                                                                                                    | 2.9 kB  00:00:00     
pgdg-common/7/x86_64/signature                                                                                                                            |  198 B  00:00:00     
pgdg-common/7/x86_64/signature                                                                                                                            | 2.9 kB  00:00:00 !!! 
pgdg11/7/x86_64/signature                                                                                                                                 |  198 B  00:00:00     
pgdg11/7/x86_64/signature                                                                                                                                 | 3.6 kB  00:00:00 !!! 
pgdg12/7/x86_64/signature                                                                                                                                 |  198 B  00:00:00     
pgdg12/7/x86_64/signature                                                                                                                                 | 3.6 kB  00:00:00 !!! 
pgdg13/7/x86_64/signature                                                                                                                                 |  198 B  00:00:00     
pgdg13/7/x86_64/signature                                                                                                                                 | 3.6 kB  00:00:00 !!! 
pgdg14/7/x86_64/signature                                                                                                                                 |  198 B  00:00:00     
pgdg14/7/x86_64/signature                                                                                                                                 | 3.6 kB  00:00:00 !!! 
pgdg15/7/x86_64/signature                                                                                                                                 |  198 B  00:00:00     
pgdg15/7/x86_64/signature                                                                                                                                 | 3.6 kB  00:00:00 !!! 
updates                                                                                                                                                   | 2.9 kB  00:00:00     
(1/10): epel/x86_64/group_gz                                                                                                                              |  99 kB  00:00:00     
(2/10): epel/x86_64/updateinfo                                                                                                                            | 1.0 MB  00:00:00     
(3/10): epel/x86_64/primary_db                                                                                                                            | 7.0 MB  00:00:00     
(4/10): pgdg11/7/x86_64/primary_db                                                                                                                        | 524 kB  00:00:02     
(5/10): pgdg12/7/x86_64/primary_db                                                                                                                        | 413 kB  00:00:02     
(6/10): pgdg13/7/x86_64/primary_db                                                                                                                        | 335 kB  00:00:02     
(7/10): pgdg15/7/x86_64/primary_db                                                                                                                        | 153 kB  00:00:00     
(8/10): updates/7/x86_64/primary_db                                                                                                                       |  24 MB  00:00:00     
(9/10): pgdg-common/7/x86_64/primary_db                                                                                                                   | 200 kB  00:00:03     
(10/10): pgdg14/7/x86_64/primary_db                                                                                                                       | 245 kB  00:00:08     
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-14 将被 安装
--> 解决依赖关系完成

依赖关系解决

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

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

总下载量:15 k
安装大小:25 k
Is this ok [y/d/N]: y
Is this ok [y/d/N]: Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/epel/packages/epel-release-7-14.noarch.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 352c64e5: NOKEY                   ]  0.0 B/s |    0 B  --:--:-- ETA 
epel-release-7-14.noarch.rpm 的公钥尚未安装
epel-release-7-14.noarch.rpm                                                                                                                              |  15 kB  00:00:00     
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 检索密钥


获取 GPG 密钥失败:[Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7"

从字面上理解,只有能获取到GPG密钥,那应该就不会提示这个报错,这应该是一种解决方法。

这里要介绍的是另一种方法:添加参数:--nogpgcheck 在安装时,跳过公钥检查。

详见:

[root@XWDBDEV01 ~]# yum install -y epel-release --nogpgcheck
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-14 将被 安装
--> 解决依赖关系完成

依赖关系解决

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

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

总计:15 k
安装大小:25 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : epel-release-7-14.noarch                                                                                                                                     1/1 
警告:/etc/yum.repos.d/epel.repo 已建立为 /etc/yum.repos.d/epel.repo.rpmnew 
  验证中      : epel-release-7-14.noarch                                                                                                                                     1/1 

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

完毕!

你可能感兴趣的:(Linux,linux,运维,服务器)