install gcc on Linux

Posted on 2005-04-07
Medium Priority
Last Modified: 2013-12-06

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?
Question by:ratnjo

Accepted Solution

surya_prabhakar earned 1500 total points
ID: 13725305
It is a warning message - but after that your installation shoudl happen ?
Did it happen or not?
Also just clean your rpm database and rebuild
rm var/lib/rpm/__db.00*, then
rpm --rebuilddb

if it still not work try the below command
rpm -ivh -v -v -v -v gcc-3.2.3-34.src.rpm  

and paste the output .

Also the following page is a great insight into troubleshooting rpm db .



Expert Comment

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

Good luck,

Expert Comment

ID: 13725856
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
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database


Expert Comment

ID: 13728887
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:
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.

Expert Comment

ID: 13728994
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 .
LVL 38

Expert Comment

ID: 13731979
> 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.



Expert Comment

ID: 13732498
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.

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.
LVL 23

Expert Comment

ID: 13732944
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question