Linux – RedHat: Can’t install package GNOME Desktop Environment

gnomelinuxredhatyum

I installed the package GNOME Desktop Environment on my machine running Red Hat version 6.4.

more /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)

At the end of the installation I got an error about missing RPM- GPG-KEY-oracle directory.

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

How can I resolve this problem?

[root@MY_BABY ~]#  yum groupinstall "X Window System" "GNOME Desktop Environment"
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
ol6_UEK_latest                    | 1.2 kB     00:00
ol6_latest                        | 1.4 kB     00:00
rhel-6-server-rpms                | 3.7 kB     00:00
rhel-6-server-rpms/primary_db     |  30 MB     00:07   

.
.
.
.
.
.


---------------------------------------------------------------------------------------    ---------------------------------------------

                                                                                           1.8 MB/s |  34 MB     00:18     
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

I also tried this

wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
--2015-01-05 13:28:14--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
Resolving public-yum.oracle.com... 82.166.201.211
Connecting to public-yum.oracle.com|82.166.201.211|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1397 (1.4K) [text/plain]
Saving to: âRPM-GPG-KEY-oracle-el5.1â 0s  


rpm --import ./RPM-GPG-KEY-oracle-el5

but still do not have the directory under /etc/pki/rpm-gpg/.

ls /etc/pki/rpm-gpg/RPM-  GPG-KEY-oracle

This is what I have in /etc/yum.repos.d:

# ls /etc/yum.repos.d
mirrors-rpmforge          public-yum-ol6.repo  rpmforge.repo             swp-default-    LVS-repo.repo
mirrors-rpmforge-extras   redhat.repo          service-cd-LVS-repo.repo  swp-default-    repo.repo
mirrors-rpmforge-testing  rhel-source.repo     service-cd-repo.repo      swp-vmware-    tools-repo.repo

Best Answer

This may actually be OEL 6, not RHEL 6. However, the solution is close to what you attempted - you simply need to obtain the OEL 6 RPM-GPG-KEY file from Oracle, not the OEL 5 key. I haven't tried this myself as I don't have OEL systems, but I think you can do this with wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el6, then rpm --import RPM-GPG-KEY-oracle-el6. If those exact commands don't work, very similar ones should. Then you should be able to install packages normally; you should not need the file in /etc/pki/rpm-gpg/ once the rpm --import completes successfully.

Alternately, if this is RHEL 6 and you don't want the OEL repositories / packages, simply remove any OEL defeinitions in the /etc/yum.repos.d/ directory tree (and any packages that own the OEL files), or otherwise disable the OEL repos, and reissue the original yum command. You should then pull the correct RHEL GNOME packages.