CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Homebashrc (https://www.cfd-online.com/Forums/openfoam-installation/57525-homebashrc.html)

stian May 16, 2007 08:49

Dear all Seams home/.bashrc
 
Dear all

Seams home/.bashrc don't exsist in fedora even it is running bash.

Annyone that can help me on this one?
I'm running fedora 6 64bit.

mwild May 16, 2007 08:58

you mean $HOME/.bashrc (or ~/.
 
you mean $HOME/.bashrc (or ~/.bashrc)? if it doesn't exist, simply create it.

stian May 16, 2007 09:05

how do I make it? I gues it'
 
how do I make it?
I gues it's suposed to contain some comands and be of a certain file format.

I gues it's suposed to be $HOME/Stian/.bashrc

mwild May 16, 2007 09:15

No. Open a shell and put the f
 
No. Open a shell and put the following code into it (all on one line):


echo ". ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc" >> ~/.bashrc


this appends the thing in between the quotes to your ~/.bashrc file.


Hope this helps...

stian May 16, 2007 09:28

Turned out that the .bashrc fi
 
Turned out that the .bashrc file is hidden by default in fedora.

Now my problem is 'foamInstallationTest' how do I runn it? I gues I have to type some magic words in a terminal.

mwild May 16, 2007 09:49

Well, on *nix like systems (i.
 
Well, on *nix like systems (i.e. linux, mac, *-bsd, etc.) all files and directories with a name starting with a . are hidden... You can show them by choosing "Show hidden files" in your file browser or in the command line with the -a option for ls, i.e.

ls -a ~/

will show all files in your home (including the hidden ones)


Once the ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc file has ben sourced (should happen in the ~/.bashrc file automatically now) you should be able to run the foamInstallationTest from the command line without any magic.

stian May 16, 2007 09:53

root@localhost ~]# foamInstall
 
[root@localhost ~]# foamInstallationTest
bash: foamInstallationTest: command not found

[root@localhost bin]# foamInstallationTest
bash: foamInstallationTest: command not found

I gues something is wrong

santos May 17, 2007 07:45

You must be logged as user, an
 
You must be logged as user, and not as root.

José Santos

stian May 20, 2007 12:55

bash: /Stian/OpenFOAM/OpenFOAM
 
bash: /Stian/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc: Ingen slik fil eller filkatalog

stian May 20, 2007 13:36

I did the whole instalation pr
 
I did the whole instalation proces all over again.

The location of OpenFOAM is home/Stian/OpenFoam/OpenFoam-1.4

I pack it all out and add the line in the bashrc fil in home/Stian and then type $Home/Stian/.bashrc and it just don't find it.

Should I just sitt down and pray that there will come a RPM I can donwload.

I'm stuck

rafal May 20, 2007 14:49

rpm will probably never come o
 
rpm will probably never come out since
installation is simple and every user
is keeping his own version of OF and
changing something in it to fit his/her
purpose.

from what I see it you are doing the following mistake:
NOT: $Home/Stian/.bashrc
but: $HOME/.bashrc
or
/home/Stian/.bashrc

bash takes HOME variable and substitute it
for something specific for user.
so HOME variable when you do $HOME is substituted
by /home/Stain (in your case).
try:
echo $HOME
should give: /home/Stain
echo $Home
should give: nothing
since Home and HOME there are two different
variables. In linux capitalization matters.
and DO NOT USE root during any part of installation
you dont need it and it can mess up with
some permissions.

follow the installation instructions and everything
will be installed properly.
and dont give up on OF http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

hope that helps
rafal

benru May 21, 2007 01:21

2 Rafal 1. After installati
 
2 Rafal

1. After installation you should change properties of some files to make them executable (by default they are not executable) to set environment correctly from $HOME/.bashrc or $HOME/.tcshrc . These files are :
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/cshrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/ensightFoam/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/ensightFoam/cshrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/createFlag
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/createFlagWithArgument
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/paraview/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/paraview/cshrc
OpenFOAM/OpenFOAM-1.4/.bashrc
OpenFOAM/OpenFOAM-1.4/.cshrc

2. I use Debian (with updates up to may 2007), and tcsh (in spite of bash). Bash script (I don't understand why) don't set environmental variables correctly on my PC.

Regards

rafal May 21, 2007 16:29

1. have never changed any of t
 
1. have never changed any of those files hmm...
but why those files need to be executable?
They have #!/bin/bash or #!/bin/csh in first line
they can be sourced in my opinion.

if you consider it a bug submit it in bug section

but i personally do not think it is a bug. on my
system everything works well and they do not have
executable attribute in my tree directory.
2. I use gentoo but it doesnt matter because OF is OS independent (providing that you have all
necessary libraries and files, demangle.h, libelf, etc.) and it should work with both bash and tcsh the same effective. if it doesnt you have found a
bug or you missed something in procedure of installing.

benru May 22, 2007 08:22

Yes, you're right. It seem
 
Yes, you're right.

It seems to me, it would be better change README (about modification of bashrc (cshrc) - 3a & 3b), where would be added single string :
source $Home/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc(cshrc)

Direct use of run $Home/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc
in .bashrc does not set environmental variables.

Thank you

stian May 26, 2007 13:01

from what I see it you are doi
 
from what I see it you are doing the following mistake:
NOT: $Home/Stian/.bashrc
but: $HOME/.bashrc
or
/home/Stian/.bashrc

bash takes HOME variable and substitute it
for something specific for user.
so HOME variable when you do $HOME is substituted
by /home/Stain (in your case).
try:
echo $HOME
should give: /home/Stain


I tryed again today and everything work like you say, but when I type

[Stian@localhost ~]$ $HOME/.bashrc
bash: /home/Stian/.bashrc: Ikke tilgang(no access)

And I get the same after typing su - and pasword.

I try to do a fresh install tomorow or some other day or just pray that Fedora one day will include it in there software library.

armin_h May 28, 2007 03:21

Dear all To install the Ope
 
Dear all

To install the OpenFoam 1.4 , i have a problem and now i solve it.

i would put it here to help any one which have a such a problem regarding to install the openfoam 1.4.

the following message appear when you wants to run FoamX:

Starting NameServer with inet:armin-desktop:1234 ...
nsd: error while loading shared libraries:: cannot open shared object file: No such file or directory

just you should go to the linux desktop and to synpatic pacakge manger and apply for the updating the libssl.so.0.9.7.

and then follow the read me instruction for the openfoam 1.4 .


Good Luck

Armin

rafal May 28, 2007 06:50

Stian to source .bashrc you n
 
Stian
to source .bashrc you need to write:
. $HOME/.bashrc
which is :
[dot][space]$HOME/.bashrc

philippose July 1, 2007 17:51

Hello there, I guess you fo
 
Hello there,

I guess you forgot that linux is case-sensitive :-)! If you put in "$home", you dont get anything, because the environment variable is "$HOME"... all capitals.

Thats where your problem lies... change that, and it should work like a charm :-)!

Have a nice day and enjoy!

Philippose

philippose July 1, 2007 17:57

And.... are you sure you want
 
And.... are you sure you want to run as root ??? Its really not recommended that you do that!

Anyway.... if you source the OpenFOAM bashrc file in the .bashrc of the user account as you seem to be trying to do.... "foamInstallationTest" will not work as root.....

One more thing... you do not need to be running as root in order to be able to modify the .bashrc file in the home directory of a user account.

And yet another thing :-)! Once you add that to the .bashrc file, you need to close the console and open a new one again, or source the .bashrc file so that the changes are updated.

Philippose

stian July 2, 2007 01:00

. $HOME/Openfoam/OpenFOAM-1.4/
 
. $HOME/Openfoam/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc

and then I get

[Stian@localhost ~]$ . $HOME/.bashrc

/home/Stian/.OpenFOAM-1.4/bashrc: cannot find FOAM installation

why is it looking in Stian/.Openfoam?

[Stian@localhost ~]$ cd /home/Stian/.OpenFOAM-1.4/
bash: cd: /home/Stian/.OpenFOAM-1.4/: Ingen slik fil eller filkatalog(no sutch file or folder)

benru July 2, 2007 07:53

2 Stian : OpenFOAM directory s
 
2 Stian : OpenFOAM directory structure and bashrc/cshrc files in your directory (home/stian) should be :

OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/(bashrc & cshrc)
OpenFOAM/OpenFOAM-1.4/(.bashrc & .cshrc)

So,
1. Check how you unpack distributive packs
2. Add string
source OpenFOAM/OpenFOAM-1.4/.bashrc (or .cshrc)
to the file hidden file /home/Stian/,bashrc

I think, that tests of installation :
OpenFOAM/OpenFOAM-1.4/bin/foamInstallationTest
will be good

regards
ruben

stian July 2, 2007 12:31

Look like I got a few problems
 
Look like I got a few problems

gcc 4.1.2
WARNING: Conflicting installations:
foam settings: /home/Stian/OpenFOAM/linux/gcc-4.1.2-64/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR


icoFoam *** not installed ***
CRITICAL ERROR



Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Unsuccessful_connection_refused* yes
FATAL ERROR: No remote shell available.
Foam1.4 enviroment requires either ssh and/or rsh.
Contact your system administrator.

benru July 3, 2007 02:18

OF needs own version of compil
 
OF needs own version of compiler to correct installation. You need to:
1. Download & unpack gcc4.1.2, java & paraview to the directory OpenFOAM/linux(64) so you have
OpenFOAM/linux(64)/gcc-1.4.2
OpenFOAM/linux(64)/paraview-2.4.4
OpenFOAM/linux(64)/java-1.4.2_05
2. You should install ssh or rsh from your RH distibutive disk using rpm (or other packet manager)

64 - if you use 64-bit based distribution.

regards
Ruben

nabildjef July 9, 2007 06:48

I am a new user of Linux; I ha
 
I am a new user of Linux; I have installed redhat9.0 for install a Openfoam-1.3. In installation of Openfoam-1.3 I follow instruction in file readme. But when I start installation of GCC the message is: Permission non accordée.
In installation of redhat I create session her name is nabil, in this session I crest file Open FOAM
To install OpenFOAM, I flowing thus instruction.
The first instruction is: $HOME/OpenFOAM/OpenFOAM-4.1.2/.OpenFOAM-1.3/bashrc
The second instruction is: $WM_PROJECT_INST_DIR/$WM_ARCH/gcc-4.1.2
But here indicate that Permission non accordée.
The same for third instruction, $WM_PROJECT_DIR/.bashrc
After he install normally openfoam, but in testing the installation indicates tow critical errors and one fatal error
I hope that you help, thank you

benru July 9, 2007 07:35

2 benyahia nabit See previo
 
2 benyahia nabit

See previous posts: correct installation should has following structure :

OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4
OpenFOAM/OpenFOAM-1.4/application
OpenFOAM/OpenFOAM-1.4/bin
OpenFOAM/OpenFOAM-1.4/lib
OpenFOAM/OpenFOAM-1.4/src
OpenFOAM/OpenFOAM-1.4/wmake
OpenFOAM/linux(64)/gcc-4.1.2
OpenFOAM/linux(64)/paraview-x.x.x
OpenFOAM/linux(64)/java-x.x.x
OpenFOAM/jobControl
OpenFOAM/nabil-1.4
OpenFOAM/run

(x.x.x - is a version number)
64-if you use 64-bit version of Linux distrib

So, you need to:
1. create OpenFOAM dir in your home directory
(home/nabil/OpenFOAM) and unpack both
distibutive archieves into it.
2. make linux(64) dir and unpack gcc, java &
paraview into it.
3 it should be created jobContol, nabil-1.4 & run
directories (see dir structure).
4. you need add a string:
source OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc
into the end of hidden file .bashrc in directory
/home/nabil to set the environment

Try, it should help 8-)
Regards
ruben


All times are GMT -4. The time now is 10:27.