linux centos7 yum 报错 Public key for *.rpm is not installed 解决方法

报错信息:

[root@localhost backup]# yum -y install net-snmp
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * updates: centos.ustc.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package net-snmp.x86_64 1:5.3.2.2-9.el5_5.1 set to be updated
--> Processing Dependency: net-snmp-libs = 1:5.3.2.2-9.el5_5.1 for package: net-snmp
--> Processing Dependency: libsensors.so.3()(64bit) for package: net-snmp
--> Running transaction check
---> Package lm_sensors.x86_64 0:2.10.7-9.el5 set to be updated
---> Package net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1 set to be updated
---> Package net-snmp-libs.x86_64 1:5.3.2.2-9.el5_5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                              Arch                          Version                                    Repository                     Size
===================================================================================================================================================
Installing:
 net-snmp                             x86_64                        1:5.3.2.2-9.el5_5.1                        update                        702 k
Installing for dependencies:
 lm_sensors                           x86_64                        2.10.7-9.el5                               base                          525 k
Updating for dependencies:
 net-snmp-libs                        i386                          1:5.3.2.2-9.el5_5.1                        update                        1.3 M
 net-snmp-libs                        x86_64                        1:5.3.2.2-9.el5_5.1                        update                        1.3 M

Transaction Summary
===================================================================================================================================================
Install       2 Package(s)
Upgrade       2 Package(s)

Total size: 3.7 M
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY,key ID e8562897
update/gpgkey                                                                                                               | 1.8 kB     00:00    


Public key for net-snmp-libs-5.3.2.2-9.el5_5.1.x86_64.rpm is not installed

在网上解决方法

此时要导入rpm的签名信息即可

以root登录,执行下面命令
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Linux版本是CentOS 7.4

执行下面命令
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

相关文章

在Linux系统中,设置ARP防火墙可以通过多种方法实现,包括使...
在Linux环境下,使用Jack2进行编译时,可以采取以下策略来提...
`getid`命令在Linux系统中用于获取当前进程的有效用户ID(EU...
在Linux环境下,codesign工具用于对代码进行签名,以确保其完...
Linux中的`tr`命令,其英文全称是“transform”,即转换的意...
Linux中的ARP防火墙是一种用于防止ARP欺骗攻击的安全措施,它...