How to compile a source code in Red Hat linux

Hello All,

I am trying to compile a source code in my virtual Red Hat. I tried to do so with the GCC compiler but the terminal returns that "the command is not found". the command line I am issuing is the following: gcc source.c -o outputname

Here is the output of uname -a respectively: "linux machinename 2.4.20-8"

can someone help?

Thanks!
LuiLui77Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mohamed MagdyCTOCommented:
yum install gcc c++

Then try your command again
0
LuiLui77Author Commented:
This is what I get:
bash: yum :command not found

wierd
0
Mohamed MagdyCTOCommented:
Install yum from rpm file.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Mohamed MagdyCTOCommented:
What is your release?

cat /etc/redhat-release

Open in new window

0
LuiLui77Author Commented:
release 9 (Shrike)
0
rindiCommented:
You are using a very ancient version of Red-Hat, that hasn't been supported for over a decade, I believe. Get something current. That was a community version of Red-Hat, and the community versions are now Fedora, while Red-Hat itself is commercial, but you can get trial version if you register with Red-Hat, or if you don't want to, then go for CentOS which is community based clone of Red-Hat.
0
Seth SimmonsSr. Systems AdministratorCommented:
yeah...i paused when i saw the 2.4.20 kernel in the beginning
red hat 9 went end of life in april 2004
time to move on...
0
TintinCommented:
Is there any particular reason you are using such an old Linux distribution?
0
LuiLui77Author Commented:
It was an assignment. I was able to find a gcc compiler by auto-tabbing. The compiler found was gcc296

Thanks to all of you!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LuiLui77Author Commented:
I have discovered the solution myself. It was the only compiler available.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.