Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle error while installing Pre-install RPM


When trying to install oracle rpm on RHEL 6 Operating system on Google Cloud VM getting below error.

Error:

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Cause :

GPG key mising.

Solution:

Download GPG key.

Command:

wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle