yum
安装软件提示:Public key for xxx.rpm is not installed
:
warning: /var/cache/yum/x86_64/7/epel/packages/libraqm-0.7.0-4.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for libraqm-0.7.0-4.el7.x86_64.rpm is not installed
Public key for libraqm-0.7.0-4.el7.x86_64.rpm is not installed
错误:RPM安装或升级时签名效验错误
原因:在安装或升级软件包时会检查软件包的签名,若系统没有导入或使用了旧版本的GPG keys,那么需要导入或获取最新的GPG keys才能安装。
查看是否安装GPG keys:
rpm -qa gpg*
查看安装GPG keys 详细信息
rpm -qi gpg-pubkey-c105b9de-4e0fd3a3
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
解决方法
1. 导入 GPG Keys
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
2.修改yum源文件,跳过gpgcheck(不推荐)
把 repo 文件设置为 gpgcheck = 0 (/etc/yum.conf)
使用 yum install 时加上参数 –nogpgcheck
3.更新最新签名(推荐)
cd /etc/pki/rpm-gpg
wget http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7