CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Problem with sourcing environmental variables (http://www.cfd-online.com/Forums/openfoam-installation/64767-problem-sourcing-environmental-variables.html)

nickninevah May 23, 2009 19:13

Problem with sourcing environmental variables
 
Hi all,

Someone please come to my rescue. I'm trying to install OpenFOAM, but for some reason, the environmental variables are not recognized. I'm using SUSE 11.1 I downloaded the latest version of OpenFOAM from git. And I added the following lines to my .bashrc file:

Code:

#source for environmental variables of openFOAM
$HOME/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc

I then sourced the edited .bashrc file. But when I check to see if any of the variables are there, nothing shows up. See the following code as an example. (I included the $HOME variable to prove that it does work in a general sense.)

Code:

nicholas@linux-jgui:~> source .bashrc
nicholas@linux-jgui:~> echo $HOME
/home/nicholas
nicholas@linux-jgui:~> echo $FOAM_INST_DIR

nicholas@linux-jgui:~>

Which you can guess that since this doesn't work, nothing else works either. Any help on this, please. And I'm a bright fresh linux user. So please feel free to explain everything simply and in complete detail. Thanks again for all the help.

gwierink May 24, 2009 03:22

Hi Nicholas,

There is a dot missing in your sourcíng line in bashrc. Now it is
Code:

$HOME/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc
and it should be

Code:

. $HOME/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc
Note the ".".

Regards,

Gijsbert

nickninevah May 25, 2009 12:15

Thanks
 
Thanks for that. It's always the little things that are hard to find.


All times are GMT -4. The time now is 11:00.