CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing OpenFOAM 1.6 on ubuntu 9.10 (http://www.cfd-online.com/Forums/openfoam-installation/71354-installing-openfoam-1-6-ubuntu-9-10-a.html)

nabeels December 27, 2009 17:42

Installing OpenFOAM 1.6 on ubuntu 9.10
 
Hello Friend
I'm trying to install OpenFOAM 1.6 (http://www.opencfd.co.uk/openfoam/linux64.html) on my ubuntu 1.6 laptop. After downloading the files available in the above link, I tried to unpack them using the command: tar xvfo <file_name>.
When I applied this command to the file OpenFOAM-1.6.General.gtgz, the process aborted in the middle and the following message appeared:

tar: Exiting with failure status due to previous errors

tar: OpenFOAM-1.6/doc/Doxygen/html/classFoam_1_1compressible_1_1RASModels_1_1mut
SpalartAllmarasStandardRoughWallFunctionFvPatchSca larField_51218d13afa96ba17d82c
deee1f2b25a_icgraph.md5: Cannot open: File name too long


This error has occurred for some other files, can anyone help me with what to do to be able to unpack the file successfully?http://ubuntuforums.org/images/smilies/confused.gif
Thank you in advance
Nabeel

gwierink December 28, 2009 04:20

Hi Nabeel,

Try the tar flag xvzf, i.e.
Code:

tar -xvzf OpenFOAM-1.6.General.gtgz

nabeels December 28, 2009 04:37

Quote:

Originally Posted by gwierink (Post 241020)
Hi Nabeel,

Try the tar flag xvzf, i.e.
Code:

tar -xvzf OpenFOAM-1.6.General.gtgz

I tried the command u gave me, and I got the same error message:confused:

gwierink December 28, 2009 04:48

Hmm, are you unpacking the right version (32/64 bit)? Are you on 32 or 64 bit Ubuntu?

nabeels December 28, 2009 04:52

Quote:

Originally Posted by gwierink (Post 241024)
Hmm, are you unpacking the right version (32/64 bit)? Are you on 32 or 64 bit Ubuntu?

I'm on 64 bit Ubuntu!

nabeels December 28, 2009 05:13

Quote:

Originally Posted by nabeels (Post 241026)
I'm on 64 bit Ubuntu!

yes, i used the right version

gwierink December 28, 2009 05:17

Ok, time for the next stupid question ;) ...

Are you unpacking in a directory called OpenFOAM and in the right order?

nabeels December 28, 2009 14:02

Quote:

Originally Posted by gwierink (Post 241030)
Ok, time for the next stupid question ;) ...

Are you unpacking in a directory called OpenFOAM and in the right order?

I guess so. I started unpacking OpenFOAM-1.6.General.gtgz then ThirdParty.General.gtgz and in the directory called OpenFOAM

Akuji January 10, 2010 06:27

What about tar -xzf OpenFoam-1.6.gtgz?

andy_ January 10, 2010 06:52

Try changing the name of the files so that they end in ".tgz". Then double clicking with the file manager and let Ubuntu do its own thing. If this does not work it is likely the file was corrupted when downloaded.

eros January 10, 2010 14:15

I think error come when tar try to write such long named file.
So broblem comes from filesystem limits. Try other filesystem there are many choices in linux.

--
Eerin

Disco_Caine March 9, 2010 05:29

Hi, seeing as this a topic on installing openfoam in ubuntu 9.10, ill post my doubt here. I have manage to extract the files, but when it comes to sourcing the bashrc file. Nothing happens, and then when i try to run the foaminstallationtest script, nothing happens. I think tis pretty obvious, something should happen.

I guess, my actual question is, firstly, how do i run the script? As to see all the errors and post them back here.

Also, this is where i put the command line on the bashrc, since it said the end of the file:

# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset cleanEnv cleanProg foamInstall foamOldDirs
unset _foamSource

#
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
-----------------------------------------------------------------------------

I hope that's fine.

Thank you in advanced

Akuji March 9, 2010 16:42

Quote:

Originally Posted by Disco_Caine (Post 249117)
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
-----------------------------------------------------------------------------

As i understand right, your truubble may be in incorrect command.
try to type ./$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc

gwierink March 10, 2010 04:15

Hi GB,

It seems you have added ". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" at the end of the $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc file. Now . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc is kind of sourcing itself. What you need to do is open up .bashrc in your home directory with e.g.
Code:

gedit $HOME/.bashrc
and add
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
at the end of that file and save it. Then, you need to make the shell aware of the new environment variable by sourcing it with
Code:

. $HOME/.bashrc
(notice the dot (".") at the start) or by just opening a new terminal.

Also, I'd remove the line you added to $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc.

Disco_Caine March 10, 2010 05:13

Hi gijs, i did what you said, i removed what i had added to the bashrc and then i followed your steps, and i got this error:

bash: /home/gustavo/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc: No such file or directory

What is strange is that its looking for it OpenFOAM-1.6/OpenFOAM-1.6, ofcourse, i dont have the OpenFOAM-1.6 duplicated, that part i did right.

I also get the error just by adding the /, akuji.

My guess is that maybe i deleted something wrong, or its not removed, hidden there, and that's what causing it to mess up?

gwierink March 10, 2010 05:18

Hi Gustavo,

This line
Quote:

bash: /home/gustavo/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc: No such file or directory
looks like you have the wrong line in $HOME/.bashrc. Are you sure that in $HOME/.bashrc it reads
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
and not
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc
?

Disco_Caine March 10, 2010 05:33

Quote:

Originally Posted by gwierink (Post 249296)
Hi Gustavo,

This line
looks like you have the wrong line in $HOME/.bashrc. Are you sure that in $HOME/.bashrc it reads
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
and not
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc
?


I am so positive it's correct, i shall copy it:

Code:


if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc

I copied a little more just to show that i put it way at the end of the file.

Like, i did delete everything openFOAM yesterday, perhaps there is a conflict somewhere?

gwierink March 10, 2010 06:35

Quote:

Code:

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
The above really looks like you added ". $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc" to the file $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc. :confused:

You need to add ". $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc" to the end of file $HOME/.bashrc, not to the end of file $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc! :)

Disco_Caine March 10, 2010 07:01

Quote:

Originally Posted by gwierink (Post 249308)
The above really looks like you added ". $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc" to the file $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc. :confused:

You need to add ". $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc" to the end of file $HOME/.bashrc, not to the end of file $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc! :)

I do not fully understand what you are telling me, because i added ". $HOME/OpenFOAM/openFOAM-1.6/etc/bashrc" to the file i opened with gedit $HOME/.bashrc, just like you said earlier.

However, from what you said, i decided to look at the hidden files in the home directory, and the .bashrc (in home) says this:

At the top:

Code:

. ~/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

At the bottom:

Code:

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

. /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc

So, obviously something is wrong, should i delete that line from the bashrc (the top line)?

gwierink March 10, 2010 07:21

Ah, right. These things can be a bit confusing sometimes at a distance via a forum :).

In the file .bashrc in the home dir ($HOME/.bashrc) there should be only one line that reads
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
Both
Code:

. ~/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc
and
Code:

. /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
are wrong. So, I would delete ". ~/OpenFOAM/OpenFOAM-1.6/.OpenFOAM-1.6/bashrc" and ". /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" from $HOME/.bashrc
and put in ". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" (without the parentheses of course :)).


All times are GMT -4. The time now is 08:48.