LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-07-2010, 07:55 PM   #1
jasonswett
LQ Newbie
 
Registered: Jan 2010
Posts: 29

Rep: Reputation: 0
Installing gcc rpm on Red Hat


I'm using Red Hat. I don't know how to tell which version, but here's this:
Code:
-bash-3.2$ uname -a
Linux lunchhub.com 2.6.9-023stab048.6-enterprise #1 SMP Mon Nov 17 19:09:18 MSK 2008 i686 i686 i386 GNU/Linux
I'm trying to install gcc from an rpm. It's not working.
Code:
-bash-3.2$ sudo rpm -Uvh gcc-3.4.3-9.EL4.src.rpm 
Password:
audit_log_user_command(): Connection refused
warning: gcc-3.4.3-9.EL4.src.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: cannot create %sourcedir /usr/src/redhat/SOURCES
-bash-3.2$
If I create the /usr/src/redhat/ dir, it claims to work but it's just kidding:
Code:
-bash-3.2$ sudo mkdir /usr/src/redhat
audit_log_user_command(): Connection refused
-bash-3.2$ sudo rpm -Uvh gcc-3.4.3-9.EL4.src.rpm 
audit_log_user_command(): Connection refused
warning: gcc-3.4.3-9.EL4.src.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
   1:gcc                    ########################################### [100%]
-bash-3.2$ man gcc
No manual entry for gcc
-bash-3.2$
Does anyone have any idea what the problem might be?

(The "Connection refused" is something that happens every time I sudo and I'm pretty sure it's unrelated.)

Thanks,
Jason
 
Old 01-07-2010, 08:12 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Does not look like a standard RHEL to me. You use a custom kernel for the lunchhub server yes?

If you do not know the version, you cannot expect an rpm to install.
Have a look at the distro kernel names.

There should be a help menu with an "about" entry - look at that.
Have a look in the rpm cache and see what the others are called. EL4 means RHEL4.
It is not clear why you are not using yum to install this - it is in the RHN repos.

However - the NOKEY error means you do not have the signiture for the rpm. You get it from the same place you got the rpm from.

The standard advise here is to use CentOS instead - this is not just the usual "my linux is best" thing: CentOS is RHEL without the strings. If you do not want to pay RH for a support contract, CentOS is easier to administer though identical in approach. Only the logo is different.
 
Old 01-07-2010, 08:23 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
I would add that gcc is usually a standard part of the installation. There should be no need to install it again unless you want a different version installed in parallel to the normal installation.

Do this to verify.
1) in a terminal, run updatedb. That will update the database of all files, no matter the source of the file, in your system.
2) when updatedb runs to competion, run 'locate gcc'. You will probably see quite a lot of filenames scrolling. That is a sure indication that you have gcc installed.

Or, as root, in a terminal run 'which gcc'. If you get something like "/usr/bin/gcc", then you have gcc installed.

Last edited by bigrigdriver; 01-07-2010 at 08:31 PM.
 
Old 01-07-2010, 11:59 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,276

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
' gcc-3.4.3-9.EL4.src.rpm ' is source code.

Hence your install to /usr/src/redhat/SOURCES/ .

The real package name is like gcc-3.4.6-11.i386.rpm
which is todays version for EL 4.

'gcc' is not installed by default, but you can get
the package from Redhat ( paid account ) or from
your install DVD / install cd disk 2.
.....
 
Old 01-08-2010, 08:26 AM   #5
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
[pedantic]actually the redhat rpm would have .EL4 in its name ...
note: in free and open source software, the real package is the sorce code. That is the whole point.[/pedantic]
 
Old 01-08-2010, 09:55 PM   #6
jasonswett
LQ Newbie
 
Registered: Jan 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks, everyone. I got a different rpm and this is what I have now:

Code:
-bash-3.2$ sudo rpm -Uvh gcc-3.2.2-5.i386.rpm 
audit_log_user_command(): Connection refused
warning: gcc-3.2.2-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        cpp = 3.2.2-5 is needed by gcc-3.2.2-5.i386
        glibc-devel >= 2.2.90-12 is needed by gcc-3.2.2-5.i386
-bash-3.2$
Fair enough. I'll install glibc-devel:
Code:
-bash-3.2$ sudo rpm -Uvh glibc-devel-2.3.2-11.9.i386.rpm 
audit_log_user_command(): Connection refused
warning: glibc-devel-2.3.2-11.9.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        glibc = 2.3.2 is needed by glibc-devel-2.3.2-11.9.i386
        kernel-headers is needed by glibc-devel-2.3.2-11.9.i386
        kernel-headers >= 2.2.1 is needed by glibc-devel-2.3.2-11.9.i386
-bash-3.2$
Okay, so I'll install glibc:
Code:
-bash-3.2$ rpm -Uvh glibc-2.3.2-4.80.6.i386.rpm 
warning: glibc-2.3.2-4.80.6.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        glibc-common = 2.3.2-4.80.6 is needed by glibc-2.3.2-4.80.6.i386
        glibc < 2.5 conflicts with glibc-common-2.5-24.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) chkconfig-1.3.30.1-2.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) popt-1.10.2-48.el5.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) tcp_wrappers-7.6-40.4.el5.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) glib2-2.12.3-2.fc6.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) expat-1.95.8-8.2.1.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) perl-5.8.8-15.el5_2.1.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) pcre-6.6-2.el5_1.7.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) libgpg-error-1.4-2.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) libtiff-3.8.2-7.el5_2.2.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) gnutls-1.4.1-3.el5_1.i386
        libc.so.6(GLIBC_2.3.4) is needed by (installed) libusb-0.1.12-5.1.i386
And the list goes on. I have no idea what to do with that.

What now?
 
Old 01-08-2010, 10:22 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 13,508

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
use yum to install packages !! if you just go about installing random rpm's ( like a DIFFERENT glib) on your system you WILL KILL IT
installing a different glibc just might have already done that . your system may never reboot again.

PAY red hat some cash $$$ and use THERE software repo
Red Hat IS NOT FREE . You need to pay them to get updates and software .


If i were you i would reformat your drive and install the current CentOS ( a free version of redhat)
CentOS 5.4 is the current.
http://centos.org/
and cent install iso.
http://isoredirect.centos.org/centos/5/isos/i386/
 
Old 01-09-2010, 02:54 AM   #8
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
jasonswett - you have not demonstrated that you are paying attention to the advise and information you are being given. You have demonstrated the opposite.

You have repeated the original mistake of attempting installing an rpm that may not be for your system. We do not actually know what your system is because you have not told us - but it seems likely as you have stated that you do not know what OS you are running. Until you solve this, we cannot help you.

You have received the same "NOKEY" error as before you you have not attempted to actually get the key. These packages are signed for a reason.

You have not responded to questions put to you.

This time you have more information - you are missing kernel headers - this is actually the same problem as your source code install in post #1 ... it wasn't that the directory was missing, it was that it did not have any header files in it. You will not get anywhere without them, but that's not your biggest problem. Recap:

gcc 2.2.2
needs:
cp 3.2 and gcc-dev > 2.2.9

so you tried to install gcc-dev 2.3.2
this needs:
glibc 2.3.2 and kernel headers

so you tried to install glibc-2.3.2
this needs
glibc-common = 2.3.2
BUT: you have a conflict with an already installed package:
glibc < 2.5 conflicts with glibc-common-2.5-24.i386

In other words, you are trying to install a package which is an earlier version than what you already have, which will not work with a big list of installed programs.

If you had not used the -U option, you would have broken your system. Install a glibc-common > 2.5-24

But seriously
Unless you can provide a compelling reason to do otherwise - use yum to install packages.
You will get no other advise unless you provide that reason.

(The advantage of providing free support is that I get to give the advise people need rather than what they want to hear.)

If you want to keep RHEL (which we guess you have) but do not want to pay for a RHN account, then you can try using community supported repos. See:
http://www.linuxquestions.org/questi...ssible-662126/
 
Old 01-09-2010, 08:00 AM   #9
jasonswett
LQ Newbie
 
Registered: Jan 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
jasonswett - you have not demonstrated that you are paying attention to the advise and information you are being given. You have demonstrated the opposite.
I apologize. I'll try to do better.

Quote:
use yum to install packages !!
Quote:
Unless you can provide a compelling reason to do otherwise - use yum to install packages.
I should have mentioned from the outset that installing yum is what I'm trying to do. My ULTIMATE goal is to install git, but it seems that I need to install yum in order to do that.

Here's what happens when I try to install yum:
Code:
-bash-3.2$ cd yum-2.0.7
-bash-3.2$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating bin/Makefile
config.status: creating etc/Makefile
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating po/Makefile
-bash-3.2$ make
for subdir in bin etc docs po ; do \
          make -C $subdir ; \
        done
make[1]: Entering directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/bin'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/bin'
make[1]: Entering directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/etc'
make[1]: Entering directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/docs'
make[1]: Entering directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/po'
for cat in cs.po es.po ru.po uk.po; do \
                lang=`basename $cat .po`; \
                if msgmerge -v $lang.po yum.pot > $lang.pot ; then \
                        mv -f $lang.pot $lang.po ; \
                        echo "msgmerge -v of $lang succeeded" ; \
                else \
                        echo "msgmerge -v of $lang failed" ; \
                        rm -f $lang.pot ; \
                fi \
        done
/bin/sh: line 2: msgmerge: command not found
msgmerge -v of cs failed
/bin/sh: line 2: msgmerge: command not found
msgmerge -v of es failed
/bin/sh: line 2: msgmerge: command not found
msgmerge -v of ru failed
/bin/sh: line 2: msgmerge: command not found
msgmerge -v of uk failed
msgfmt --statistics --verbose -o cs.mo cs.po
make[1]: msgfmt: Command not found
make[1]: *** [cs.mo] Error 127
make[1]: Leaving directory `/var/www/vhosts/lunchhub.com/setups/yum-2.0.7/po'
make: *** [all] Error 2
Sorry again - I should have mentioned my overall goal in my original post.

Last edited by jasonswett; 01-09-2010 at 08:01 AM.
 
Old 01-09-2010, 08:03 AM   #10
jasonswett
LQ Newbie
 
Registered: Jan 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Code:
You have repeated the original mistake of attempting installing an rpm that may not be for your system. We do not actually know what your system is because you have not told us - but it seems likely as you have stated that you do not know what OS you are running. Until you solve this, we cannot help you.
I would love to tell you what it is. How do I find out?
 
Old 01-09-2010, 09:03 AM   #11
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
I should have mentioned from the outset that installing yum is what I'm trying to do.
Yum should be on your install media.

If you verify that you have RHEL4, then you can install yum from an rpm.

Quote:
I would love to tell you what it [your system] is. How do I find out?
cat /etc/redhat-release

(failing that - look for a file in /etc which sounds like it contains a distro name ... /etc/debian-version for example.)

Someone had to install it - find that person and ask them. Find the install disk and look at what was written on it. Look at the files inside the install disk and see what they are called. There will even be a file that will tell you what it is.

I noticed that uname -a was not very useful for determining your distro because it appears to be a custom one made specifically for and/or by lunchhub.com. When the distro was originally installed, there was a distro kernel that came with it - this may still be there, as an option in the grub menu or in /boot - so go look. The kernels are called vmlinuz-something.

Reboot - when you get the option, load the grub menu and select a different kernel. When that loads, do uname -a.

Look for the rpm cache (locate rpm) - if you have RHEL4 then the rpms will have names of the following pattern: name.version.EL4.rpm

If you have a gui, look in the main menus and the control center or whatever your gui has for an "about" entry - you will often find it in a "help" menu item. There may be other clues like a picture of a red hat to the left of a panel. Stuff like that.


What you are experiencing is called "dependency hell" and is the reason for package managers like yum and apt. Older RHEL used up2date - for which you need a RHN account. Try running up2date as root and see what happens. If it tries to connect but fails then you have an old version of RHEL.


From the sounds of things, you either have an old RHEL (RHEL4 is very likely as that also had a 2.6.9 kernel) or something not RH which has a poor installation. The trouble is that even if you do figure out which distro you have, it is unlikely to help much. An out of date distro is hard to maintain - and is only going to get harder with more and more hellish dependencies.

You really want a newer distro which is easier to manage. What you want depends on your requirements.

CentOS is RHEL without the commercial bias - it is strongly maintained yet has a long release schedule which suits a commercial environment. We usually succest this for people who like RHEL but do not want to buy support. Which is why it is being pushed on you. Your big advantage will be that it comes with yum already, and lots of repos and wide 3rd-party support.

Last edited by Simon Bridge; 01-09-2010 at 09:14 AM.
 
Old 01-09-2010, 10:53 AM   #12
jasonswett
LQ Newbie
 
Registered: Jan 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks for the information. Here's this:
Code:
-bash-3.2$ cat /etc/redhat-release 
CentOS release 5.2 (Final)
Does that mean I'm running CentOS and not RHEL?

Quote:
Yum should be on your install media.
Unfortunately this machine is a VPS. I don't have the install media because some sysadmin at Media Temple installed the OS, not me.

So without having the install media, is there any reasonably easy way for me to install yum or should I maybe start shopping around for a different host?
 
Old 01-09-2010, 01:59 PM   #13
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Well well well, you are running CentOS 5 - this is good news!

This person has exactly the same situation as you (Centos5 VPS - minimal install - no yum) only solved! This is exactly what you want.

Strongly urge you obtain the install media - you can download it.
http://isoredirect.centos.org/centos/5/isos/i386/
... I know - bandwidth - I used to use an internet cafe for this. They charged me NZ$10 for the dvd. If nothing else, it can act as a rescue disk.

Happy hacking.
 
Old 01-10-2010, 12:05 AM   #14
itsbrad212
Member
 
Registered: Nov 2009
Location: Chicago
Distribution: Arch and OpenBSD
Posts: 104

Rep: Reputation: 19
If you or anyone reading this needs help installing gcc, glibc, etc.
then go to http://www.linuxfromscratch.org/lfs/view/development/. Scroll down to "III. Building the LFS System" and find the piece of software from that list you are trying to install.
 
Old 01-10-2010, 12:39 AM   #15
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
Stop all that right there, your system is in terrible shape, you installed RPM from anywhere and done a lot of things that you should not have done. Many information you provided to us are HIGHLY CONTRADICTING an should not be present on the same system.

-You use some kind of custom RHEL4 kernel on CentOS5
-You try to install GCC3 on a GCC4 based system
-You try to install a glibc version that will totally and permanently -kill- your system
-If your system was really a CentOS5, yum would be installed and impossible to remove without --force
-Git is available in both RHEL4 and 5 repository, same goes for CentOS, but your system look like a RHEL4, even if it is identified and CentOS5

Even if this is an important and in production server, just take the drive out and install a new CentOS 5 on it. Never install any RPM by hand anymore -ever-, use yum. Your system is probably highly compromised, unstable and unsecure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) compilation error adhesh_19 Red Hat 0 01-05-2010 06:34 AM
upgrading the gcc to v3.4.5 on red hat 9 mlaich Linux - Newbie 3 01-02-2006 05:15 PM
install new gcc v3.4.5 over gcc v3.2.2 on red hat 9 mlaich Linux - Newbie 2 01-01-2006 09:52 PM
Installing gcc-2.95.3 and glibc-2.2.5 on Red Hat 9 sspraggs Red Hat 2 09-25-2004 03:10 PM
Installing gcc 2.95.3 on Red Hat 7.0 Quen Linux - Software 0 09-22-2001 11:58 AM


All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration