1. 程式人生 > >Yum離線安裝(五) --- yum 出現Public Key錯誤的解決

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