1. 程式人生 > >centos 更換源之後yum下載失敗

centos 更換源之後yum下載失敗

今天在更換了物理機centos的源之後,yum下載其他軟體的時候失敗了,同時出現了下面的錯誤。

Downloading packages:
warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-9.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY`這裡寫程式碼片`
Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


The GPG keys listed for the "CentOS-7 - Extras - 163.com"
repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. Failing package is: epel-release-7-9.noarch GPG Keys are configured as: http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

google之後是yum源更新後需要匯入 key值,否則就會報上面的錯誤,無法安裝相關的包。 這裡的解決辦法是加上“–nogpgcheck”就可以了,即去掉gpg檢查,然後重新下載epel源

yum install epel-release --nogpgcheck

問題解決。