Wednesday, December 7, 2016

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

Issue:

Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
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


Solution:

Run below one to get RPM-GPG-KEY-oracle file.

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

Now you should able to run yum without any issues.

Yum not installaing rpms in Cent OS

Issue:

[root@test u03]# yum install oracle-rdbms-server-12c*
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * centosplus: mirror.fibergrid.in
 * contrib: mirror.fibergrid.in
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
No package oracle-rdbms-server-12c* available.
Error: Nothing to do

[root@test etc]# cd yum.repos.d
[root@test yum.repos.d]# ls
CentOS-Base.repo  CentOS-Base.repo.rpmnew  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Vault.repo

Solution:

Run below one to get public-yum-ol6.repo file.

[root@test yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2016-12-06 06:01:55--  http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... , 
Connecting to public-yum.oracle.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7301 (7.1K) [text/plain]
Saving to: âpublic-yum-ol6.repoâ

100%[==============================================================================================================================>] 7,301       --.-K/s   in 0s

2016-12-06 06:01:59 (15.8 MB/s) - âpublic-yum-ol6.repoâ

Now yum install run successfully

yum install oracle-rdbms-server-12c*

====================================================================
 Package             Arch    Version      Repository    Size
====================================================================
Installing:
 oracle-rdbms-server-12cR1-preinstall                    
                    x86_64  1.0-14.el6    ol6_latest    17 k
Installing for dependencies:
 cloog-ppl      x86_64  0.15.7-1.2.el6   base           93 k
 compat-libcap1 x86_64  1.10-1           base           17 k
 compat-libstdc++-33                                     
                x86_64  3.2.3-69.el6     base           183 k
 cpp            x86_64  4.4.7-17.el6     base           3.7 M
 gcc            x86_64  4.4.7-17.el6     base           10 M
 gcc-c++        x86_64  4.4.7-17.el6     base           4.7 M
 ksh            x86_64  20120801-33.el6  base           761 k
 libaio-devel   x86_64  0.3.107-10.el6   base           13 k
 libstdc++-develx86_64  4.4.7-17.el6     base           1.6 M

Transaction Summary
====================================================================
Install      14 Package(s)

Total size: 54 M
Installed size: 164 M
Is this ok [y/N]: y