I've just tried to install APCUPSD and have run into a missing C compiler error. I then ran
yum install compat-gcc-34-g77
which went fine but the error did not go away, I tried
which gcc
as well as
which compact-gcc
both returned the errors
/usr/bin/which: no gcc in
(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/trent/bin)
how do I make sure it is in the $PATH?
UPDATE
I should probably mention the path to where the gcc is
/usr/lib/gcc/x86_64-redhat-linux/3.4.6
Answer
You have to add the path /usr/lib/gcc/x86_64-redhat-linux/
to your $PATH
environment variable.
Put in a line in ~/.profile
as follows:
PATH=$PATH:/usr/lib/gcc/x86_64-redhat-linux/
It will add the path to the variable. But in the current session, the file must be sourced again to be applied. Use that command for that:
. ~/.profile
Then which gcc
should reply the correct path.
No comments:
Post a Comment