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 Code:
-bash-3.2$ sudo rpm -Uvh gcc-3.4.3-9.EL4.src.rpm Code:
-bash-3.2$ sudo mkdir /usr/src/redhat (The "Connection refused" is something that happens every time I sudo and I'm pretty sure it's unrelated.) Thanks, Jason |
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. |
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. |
' 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. ..... |
[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] :) |
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 Code:
-bash-3.2$ sudo rpm -Uvh glibc-devel-2.3.2-11.9.i386.rpm Code:
-bash-3.2$ rpm -Uvh glibc-2.3.2-4.80.6.i386.rpm What now? |
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/ |
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/ |
Quote:
Quote:
Quote:
Here's what happens when I try to install yum: Code:
-bash-3.2$ cd yum-2.0.7 |
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. |
Quote:
If you verify that you have RHEL4, then you can install yum from an rpm. Quote:
(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. |
Thanks for the information. Here's this:
Code:
-bash-3.2$ cat /etc/redhat-release Quote:
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? |
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. |
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. :D |
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. |
All times are GMT -5. The time now is 10:29 AM. |