Link to home
Start Free TrialLog in
Avatar of ratnjo
ratnjo

asked on

install gcc on Linux

Hi,

I'm trying to install gcc-3.2.3-34.src.rpm on Red Hat Linux 3.0 update 3.
I have downloaded it and try to install it in the following ways:

rpm -Uvh gcc-3.2.3-34.src.rpm   or rpm -i gcc-3.2.3-34.src.rpm

but I receive the following error message:
warning: gcc-3.2.3-34.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of surya_prabhakar
surya_prabhakar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ben-gur
ben-gur

Not sure if it is included in your RH version, but you can try executing:
up2date gcc

Good luck,
Adam.
That's because of you don't have signature of Redhat.
Ignore this using --force option of the rpm.

To install:
rpm -Uhv --force gcc-3.2.3-34.src.rpm

But, btw. Are you sure you want to install src.rpm?
Maybe you need to build a binary package to use it, don't u?

To build the package use:
rpmbuid --rebuild --target=i686 gcc-3.2.3-34.src.rpm
Then, install the binary
rpm -Uhv gcc-3.2.3-34.i686.rpm
Marxy is right, ignore the other suggestions, especially the one by surya_prabhakar, you do not want to mess with your rpm db.

IF you actually want to install the source rpm do thos:

rpm --install --hash --force gcc-3.2.3-34.src.rpm
This will install the SOURCE.

Then, go to:
/usr/src/redhat/SPECS
ls gcc*
then rpmbuild -ba <whatever file you see that starts with gcc>

This will rebuild the source rpm, and build all the binary rpm's you need.

I would suggest you use a binary rpm instead of building gcc.  Gcc takes a long time to build.
What I thought was that It could be some sort of corrupted database which can be re-created . My commands simply recreate the db . They dont mess up .

AlexeyZilber :
    Everybody gives there opinions in a discussion group like this .Instead of flaming on others why dont you give your suggestions and keep quiet . If you want to say that someone is incorrect , you can say it in a better way . Dont you know these basic ethics of discussion group .
> warning: gcc-3.2.3-34.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
This kind of warning messages I saw most of time.
It's just a warning.
When you do
rpm -Uvh gcc-3.2.3-34.src.rpm   or rpm -i gcc-3.2.3-34.src.rpm
The source codes should be already installed in /usr/src/<kernerl version>/.....

The following command just show this message and do nothing.
You might want to do
rpm -qa |grep -i gcc
to check.

However, I wouldn't recommend to use "--force" since it break the dependency and will cause a lot of issues later on.

I'm leaning to marxy's suggestion to build binary rpm out of src.rpm then use "rpm -Uvh" to upgrade your current gcc binary version.

Regards,

Wesly
If you're bothered by:
 > warning: gcc-3.2.3-34.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e

   Then just do rpm --import <key file or url> and that will take care of that problem.  You can find the gpg key either on the cd, website, or iso where you got the install from.  Then you can proceed as normal.

I think the question has already been chewed on quite well.


surya_prabhakar:
Your lack of experience and immaturity shines through quite well.  The reason I picked YOUR comment out specifically is because "IT IS DANGEROUS" for a newbie.  It is in the realm of next-to-last-resort, and completely irrelevent to the question.  Like sticking your head in an oven for example.  That's not revlevent. So grow up and learn to take criticism so that you can learn.
ratnjo: Are you sure you want to be installing a .src.rpm file of GCC?

The vendor of your distribution probably provides  on the installation medium
packages of the form *i386.rpm or  [othername].rpm files
that in particular are not '.src.rpm'... binary packages
which are much more convenient for ordinary purposes.

>warning: gcc-3.2.3-34.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e

The warning message is an indication that the .SRC.RPM file has been digitally
signed; however, due to the fact your system likely has no record of the public key,
a NOKEY error message is given.

You could try
   rpm --checksig gcc-3.2.3-34.src.rpm

It should give a similar kind of result or indication that RPM is unable to verify the
digital signature.  This is a form of security warning, the implication is that since you
don't have a copy of the signer's public key:  you can't verify the signature.

Ordinarily, if RPM could verify the signature, it would suggest the package has not been
tampered with (depending on how confident you are about the signer and that you have stored
the correct public key)

It is just a warning, probably because installing a source RPM in itself is not a major security
issue.  The moment you start building a binary package from the source, however, using
rpmbuild or similar, it becomes a possible issue... particularly if you are uncomfortable about
the source you downloaded the RPM from

(If you downloaded from Redhat.com, or pulled the .SRC.RPM off a CD Rom that
 you bought off the shelf, then it is probably safe, but it is best practice to verify
 package signatures prior to installation.)

To eliminate the warnings the right way,  you need a copy of the Public Keys Redhat uses
to sign things, particularly key #  db42a60e
Try here:  ftp://ftp.redhat.com/pub/redhat/linux/9/en/doc/RPM-GPG-KEY

And like  AlexeyZilber says:
     rpm --import <filename>

Once you download a copy of the key or load the CD which should have the key as well
and find the proper path