今天遇到一个在CentOS7下用rpm-gpg-key-epel-6的文件安装

yum install gridengine-6.2u5-10.el6.4.x86_64 gridengine-devel-6.2u5-10.el6.4.x86_64 gridengine-execd-6.2u5-10.el6.4.x86_64 -y

结果爆出如下错误:

安装大小:55 M

Downloading packages:

warning: /var/cache/yum/x86_64/7/epel/packages/fedora-usermgmt-0.10-1200.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY

从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 检索密钥



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

[root@mailan yum.repos.d]# rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-20-primary

错误:/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-20-primary: import read failed(2).


后来搜索半天,找出解决方法,执行如下操作即可:

将/etc/pki/rpm-gpg目录下的rpm-gpg-key-epel-6导入即可

[root@mailan rpm-gpg]# pwd

/etc/pki/rpm-gpg

[root@mailan rpm-gpg]# ls -l

总用量 16

-rw-r--r--. 1 root root 1690 11月 30 2016 RPM-GPG-KEY-CentOS-7

-rw-r--r--. 1 root root 1004 11月 30 2016 RPM-GPG-KEY-CentOS-Debug-7

-rw-r--r--. 1 root root 1690 11月 30 2016 RPM-GPG-KEY-CentOS-Testing-7

-rw-r--r--  1 root root 1649 11月  5 2012 rpm-gpg-key-epel-6

[root@mailan rpm-gpg]# 



[root@localhost yum.repos.d]#

[root@localhost rpm-gpg]# rpmkeys --import /etc/pki/rpm-gpg/rpm-gpg-key-epel-6