一:操作:
用yum安装pssh服务:
[[email protected] ~]# yum install pssh
二:故障信息:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Public key for pssh-2.3.1-5.el6.noarch.rpm is not installed
三:故障分析:
看见“NOKEY”后,就想是不是没有导公钥,然后,就用rpm -qa gpg-pubkey*查询是否导入公钥
[[email protected] ~]# rpm -qa gpg-pubkey*
第一次,确实没有导入,然后,就执行 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7(我用的Centos 7版本,根据自己版本导入)
[[email protected] ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
本以为,这样就OK了,所以继续执行yum install pssh,结果还是报同样的问题。所以就很纠结啊,说没公钥,我导入公钥了,还是不行,我上网搜,也是说各种导公钥,都试了,并没什么卵用。然后无意间跟同学聊天,说了一下这个问题,结果,超出意料外的简单!!!
四:故障解决:
在配置yum仓库时,忘记在yum仓库文件写gpgcheck=0了,因为默认是gpgcheck=1的(即:在安装时要检查公钥)。(笨蛋,学着忘着,感觉自己瞬间没自信了)。下面是我自己的yum仓库文件(因为现在所学的很多服务都依赖epel源,所以,索性就两个都配上)
[[email protected] ~]# cat /etc/yum.repos.d/sjj.repo [base] name= Centos 7 baseurl=file:///run/media/root/CentOS\ 7\ x86_64 gpgcheck=0 [epel] name=Centos 7.1 baseurl=http://172.17.0.1/fedora-epel/7/x86_64/ gpgcheck=0 [[email protected] ~]# [[email protected] ~]# yum clean all #清空一下缓存 Loaded plugins: fastestmirror, langpacks Cleaning repos: base epel Cleaning up everything Cleaning up list of fastest mirrors [[email protected] ~]# yum makecache #然后再制造缓存(从yum仓库里读取) Loaded plugins: fastestmirror, langpacks base | 3.6 kB 00:00 epel | 4.3 kB 00:00 (1/9): base/group_gz | 155 kB 00:00 (2/9): base/primary_db | 5.6 MB 00:00 (3/9): epel/group_gz | 170 kB 00:00 (4/9): base/filelists_db | 6.6 MB 00:00 (5/9): base/other_db | 2.4 MB 00:00 (6/9): epel/updateinfo | 757 kB 00:00 (7/9): epel/primary_db | 4.6 MB 00:00 (8/9): epel/filelists_db | 7.6 MB 00:01 (9/9): epel/other_db | 2.1 MB 00:00 Determining fastest mirrors Metadata Cache Created [[email protected] ~]#
执行过上述操作后,再yum install pssh就OK。
时间: 2024-10-26 10:58:34