Skip to content

How to Resolve GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"

  • by

GPG key retrieval failed

Tried to install some packages through yum, but it failed with "GPG key retrieval failed".

This is because yum repository cannot find a valid GPG key for Linux to verify the installation, so the solution is to download the proper GPG key for your system. In this case, we used Oracle public yum in CentOS 7 to install packages.

Oracle Linux 6

[root@primary01 yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

Oracle Linux 7

[root@primary01 yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
[root@primary01 yum.repos.d]# ll /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
-rw-r--r--. 1 root root 1011 Jul 23  2014 RPM-GPG-KEY-oracle

Please note that, the target filename has been changed and is different from the source.

Leave a Reply

Your email address will not be published.