Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 11-01-2012, 05:12 PM   #1
LQ Newbie
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
Redhat 9 C compiler

For a project I have to run Redhat 9 as a virtual machine (I'm using VirtualBox). I also need to be able to write and run programs on it, so I need to be able to compile and run a C program. I know that in usr/bin I have gcc269, however when I attempt to compile a simple hello world program I am told that the gcc command does not exist. I am not particularly experienced with Linux, and the only compilers I have used have already been installed on the OS (mac basically), as such I don't know how to install a compiler by just downloading the tar ball. Basically, how do I install or get a gcc compiler working so I can run C programs on Redhat 9?
Old 11-01-2012, 05:58 PM   #2
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Rep: Reputation: 4
So you're running gcc, but the shell tells you that gcc command does not exist? It could be that either /usr/bin is not in your path, or it is but you have to run gcc269 instead of gcc.

try echo $PATH, and see.
why don't you post the output that you get?
Old 11-01-2012, 06:16 PM   #3
LQ Newbie
Registered: Nov 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
I'm using the terminal, going to the folder that holds the program, and doing gcc program.c I get the response: bash: gcc: command not found.

When I type in echo $PATH I get /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:home/user_name/bin
Old 11-02-2012, 04:50 AM   #4
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Rep: Reputation: 4
So /usr/bin is in your path, try then gcc269 it should work.

to get around this go to /usr/bin switch to root and then:

ln -s gcc gcc269
this will create a link gcc to gcc269, so running gcc will execute gcc269.
Old 11-02-2012, 06:13 AM   #5
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734
Someone will eventually jump in and say that Redhat 9 is hopelessly obsolete---why not use a more modern distro (one that is supported and has everything in the repositores)?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] help with use the c compiler on redhat 6.1, been there for over 2 weeks now!!!!!!!! tchofo Programming 5 07-10-2012 02:48 AM
Help - choosing a compiler for linux redhat 8 roei86 Linux - Newbie 8 03-18-2012 11:29 AM
LyX-1.4.3 compiler error on redhat-7.3 dirgni Linux - Software 2 10-05-2006 12:23 PM
Redhat 9 GCC compiler HELP! (n00b here) Jaykay3k Linux - Software 5 02-21-2005 12:59 PM
'C' compiler for redhat linux 9.... mahamkali Linux - Software 4 12-04-2003 11:14 AM

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration