1

I have followed the steps in the similar thread.

sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo \ 
http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo

this I think worked fine, then

sudo yum install devtoolset-2

which failed with the error:

warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 1d1e034b: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern


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

Indeed this file is not in /etc/pki/rpm-gpg on my computer. Am I supposed to get the file from somewhere and put it there by "hand"?

4

I had the same issue and I used the --nogpgcheck flag

yum install --nogpgcheck devtoolset-2

In order to then use gcc 4.8.2, I just set the path to the new one

/opt/rh/devtoolset-2/root/usr/bin/gcc

Or you can run this command to open a bash shell with devtools-2 enabled :

scl enable devtoolset-2 'bash'

|improve this answer|||||
0

The answer to the question is yes, if the gpg key is referenced in the repo file you installed you need the gpg key as well.

It is likely in the same dir as the repo file.

Just make sure you get the right file or the gpg check won't actually protect you.

But why don't you use the gcc that is shipped with RHEL? There is no need to enable third party repos for gcc as far as I can tell.

If you need a newer version then perhaps you can get it in the red hat software collections repo? It's a separate subscription but it's free, all you need to do is request it via the support portal.

|improve this answer|||||
  • Thanks Bram, I don't find the file RPM-GPG-KEY-cern on my computer. For the project we are setting up, gcc 4.8 or newer is needed and RHEL6 comes with gcc 4.4.7. – Zen Oct 19 '15 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.