Linux bash: cc :

hellripper

Disciple
when im executing a c program im getting the following error

bash : cc : command not found . . .

what should i do
what is the mistake ive committed

can any one help me out
 
It is either not installed, or is not in your path. You need to provide more details about OS etc. for people to give further instructions
 
check you PATH variable (echo $PATH)
You should see the paths to the binaries like /bin/, /usr/bin/, /usr/local/bin/ etc. Normally all the binaries of the commands executed are present in those directories.
See in those paths if "cc" exists.
Or try compiling using "gcc" and if its works you can simply make a softlink to make "cc" work too.
(commands :
which gcc
cd <to the directory>
ln -sf gcc cc
)

Or if you couldn't find gcc in you machine, you gotta install it.
Look in the package manager - easier way.
Or download and install the gcc rpm
 
You can even use

Code:
update-alternative --config gcc or cc

and then using set command to change / create symlinks using

Code:
 update-alternatives --set <option>
 
Back
Top