您的足迹:首页 > Linux >【原创】yum install 时报错GPG key retrieval failed: [Errno 14] 解决办法

【原创】yum install 时报错GPG key retrieval failed: [Errno 14] 解决办法

问题描述:

在执行命令:yum install htop时报错如下:

[root@biqa161 yum.repos.d]#  yum install htop
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package htop.x86_64 0:1.0.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                                Arch                                     Version                                       Repository                              Size
============================================================================================================================================================================
Installing:
 htop                                   x86_64                                   1.0.3-1.el6                                   epel                                    83 k

Transaction Summary
============================================================================================================================================================================
Install       1 Package(s)

Total size: 83 k
Installed size: 178 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6


GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

解决办法一:忽略KEY值检查。

yum install htop --nogpgcheck
[root@biqa161 yum.repos.d]#  yum install htop --nogpgcheck
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: ftp.kddilabs.jp
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package htop.x86_64 0:1.0.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                                Arch                                     Version                                       Repository                              Size
============================================================================================================================================================================
Installing:
 htop                                   x86_64                                   1.0.3-1.el6                                   epel                                    83 k

Transaction Summary
============================================================================================================================================================================
Install       1 Package(s)

Total size: 83 k
Installed size: 178 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : htop-1.0.3-1.el6.x86_64                                                                                                                                  1/1 
  Verifying  : htop-1.0.3-1.el6.x86_64                                                                                                                                  1/1 

Installed:
  htop.x86_64 0:1.0.3-1.el6                                                                                                                                                 

Complete!

问题解决!

解决办法二

rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6

解决办法三

You have to install the epel-release package first in order to get GPG-Keys installed:

sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

以上三种办法,第一种时临时关闭key检查,并不能从根本上解决问题。第二、第三解决办法可从根本上解决问题。

本博客所有文章如无特别注明均为原创。作者:数据为王复制或转载请以超链接形式注明转自 数据为王
原文地址《【原创】yum install 时报错GPG key retrieval failed: [Errno 14] 解决办法

相关推荐


  • blogger

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)