install gcc on Linux

Posted on 2005-04-07
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
    LVL 7

    Accepted Solution

    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 .


    LVL 4

    Expert Comment

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

    Good luck,
    LVL 8

    Expert Comment

    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
    LVL 1

    Expert Comment

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

    Expert Comment

    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

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


    LVL 1

    Expert Comment

    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

    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, 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:

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now