Link to home
Start Free TrialLog in
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!
Avatar of Mohamed Magdy
Mohamed Magdy
Flag of Egypt image

yum install gcc c++

Then try your command again
Avatar of LuiLui77
LuiLui77

ASKER

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

wierd
Install yum from rpm file.
What is your release?

cat /etc/redhat-release

Open in new window

release 9 (Shrike)
Avatar of 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.
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?
ASKER CERTIFIED SOLUTION
Avatar of LuiLui77
LuiLui77

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have discovered the solution myself. It was the only compiler available.