Setting environmental variables in mandrake
I have been trying to install several programs but I keep getting an error to do with the C compiler.
These are two of the common errors i get: 1. "installation or configuration problem: C compiler cannot create executables." 2. "gcc: installation problem, cannot exec `cpp0': No such file or directory *** The command 'gcc -o conftest -O2 conftest.c' failed. *** You must set the environment variable CC to a working compiler." As the second message indicates, it has to do with an environmental variable not being set. I would like to know if anyone can tell how to set environmental variables in mandrake. thanks, -inprogress |
What happens if you just type
Code:
gcc --version pick it up you can set your environment variables in bash as follows CC=/path/to/compiler export $CC Cheers, Tink |
Thanx for your response,
When i type in the code i get version 2.96 When i type CC=/path/to/compiler export $CC i get the error message: "bash: export: "path i entered":not a valid identifier" I tried the following paths: CC="/usr/bin/gcc-2.96.exe" CC=/usr/bin/gcc-2.96.exe CC="/usr/bin/" CC=/usr/bin/ None of those ways worked. Do you know why? -inprogress |
Hmmm ... odd.
But exe isn't anything that linux knows/cares about ... Cheers, Tink |
to set the path for the current session:
export PATH=$PATH:/my/new/path to have the path set every time that you log on, go to your home directory and look for the file .bash_profile. edit/insert a line like: PATH=$PATH:/my/new/path however, it doesn't sound like bash is complaining about not being able to find executable files, such as the gcc compiler. i think something else may be wrong. you could also try to compile as root (su). |
All times are GMT -5. The time now is 09:54 AM. |