Avatar of LuiLui77
LuiLui77
 asked on

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!
LinuxInstallationLinux Distributions

Avatar of undefined
Last Comment
LuiLui77

8/22/2022 - Mon
Mohamed Magdy

yum install gcc c++

Then try your command again
LuiLui77

ASKER
This is what I get:
bash: yum :command not found

wierd
Mohamed Magdy

Install yum from rpm file.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Mohamed Magdy

What is your release?

cat /etc/redhat-release

Open in new window

LuiLui77

ASKER
release 9 (Shrike)
rindi

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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Seth Simmons

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

Is there any particular reason you are using such an old Linux distribution?
ASKER CERTIFIED SOLUTION
LuiLui77

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
LuiLui77

ASKER
I have discovered the solution myself. It was the only compiler available.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy