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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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
LuiLui77Author Commented:
This is what I get:
bash: yum :command not found

Mohamed MagdyCTOCommented:
Install yum from rpm file.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Mohamed MagdyCTOCommented:
What is your release?

cat /etc/redhat-release

Open in new window

LuiLui77Author Commented:
release 9 (Shrike)
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.
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...
Is there any particular reason you are using such an old Linux distribution?
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!

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

From novice to tech pro — start learning today.