Yum离线安装(五) --- yum 出现Public Key错误的解决

在yum安装本地rpm文件时遇到public key不正确问题

Downloading Packages:  
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897  
  
  
Public key for hal-devel-0.5.8.1-59.el5.i386.rpm is not installed


办法1:

操作前先导入RPM签名信息

#cenos4  
rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY  
#centos5  
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 


办法2:

修改yum.conf 文件,把gpgcheck=1改为gpgcheck=0

办法3:

命令中添加–nogpgcheck参数,例如:

yum install php --nogpgcheck


你可能感兴趣的:(linux)