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.7.x on CAElinux without Internet Connection (http://www.cfd-online.com/Forums/openfoam-installation/89449-installing-openfoam-1-7-x-caelinux-without-internet-connection.html)

joel.lehikoinen June 13, 2011 08:54

Installing OpenFOAM 1.7.x on CAElinux without Internet Connection
 
Hi,

I need OpenFOAM 1.7.x for my work, but I'm having difficulties installing it. Unfortunately the IT regulations of my employer prohibit connecting Linux machines to the Internet, so I cannot use git to install the version 1.7.x. I have downloaded the OpenFOAM 1.7.x source code on another machine and copied it to my CAElinux machine.

The first step in the installation process is setting the environment variables. But when I try to source etc/bashrc file, I just get an error message:
Code:

: command not found
: command not found
: command not found
: command not found
': not a valid identifierDIR
: command not found
: command not found
'ash: etc/bashrc: line 78: syntax error near unexpected token `
'ash: etc/bashrc: line 78: `_foamSource()

I don't really have an idea what's happening here. I have OpenFOAM 1.7.1 installed and working. Sourcing the 1.7.1-version of bashrc works fine. My install directory is the standard $HOME/OpenFOAM/ where the different versions are in their respective folders.

Do I need to do something before I can run the etc/bashrc script or why does it not work?

Thank you for your help,
Joel

wyldckat June 13, 2011 16:03

Greetings Joel,

Indeed, those are some very strange errors! Specially this one:
Code:

: command not found
The ":" is suppose to be a null command, i.e. a stub for doing nothing!

OK, lets try to isolate and conquer:
  1. How are you sourcing each bashrc file for each OpenFOAM version? In other words, is something like this:
    Code:

    source /opt/openfoam171/etc/bashrc
    defined in your $HOME/.bashrc file? If so, don't.
    Use something like this instead:
    Code:

    alias of171='source /opt/openfoam171/etc/bashrc'
    alias of17x='source /opt/openfoam171/etc/bashrc'

    Then whenever you want one of the versions, start a new terminal window/tab and run the respective alias name, i.e. of171 or of17x.
  2. It's possible that the files you downloaded were somehow damaged. Remove the current 1.7.x folder, download and unpack them again.
    By the way, how exactly did you download and unpack them, so we can be certain of your steps and also be able to reproduce them if necessary...
OK, to continue I'll need some more feedback.

In the mean time, here are two links to my blog on how to still have git on an internetless machine:

Best regards,
Bruno

joel.lehikoinen June 14, 2011 05:16

Hi,

thank you very much for your help. I managed to install version 1.7.x with the help of the advice from your blog post. I'd guess the files were somehow corrupted, even though at least bashrc opened fine in a text editor. I didn't actually download the non-working source myself, my boss just gave it to me. He's not here this week so I can't be sure, but it could be that maybe he tried to download directly to the USB drive, which usually has bad consequences...

Anyway, thank you very much for you help! :)

wyldckat June 14, 2011 11:09

Hi Joel,

Quote:

Originally Posted by joel.lehikoinen (Post 311930)
but it could be that maybe he tried to download directly to the USB drive, which usually has bad consequences...

Indeed, removable storage can be quite unstable for these kinds of file operations! I remember the days back when we only had diskettes for data transport... even then, direct file operations could end up very badly...

Quote:

Originally Posted by joel.lehikoinen (Post 311930)
Anyway, thank you very much for you help! :)

You're welcome! I'm glad I could help you so quickly :)

Best regards,
Bruno


All times are GMT -4. The time now is 19:33.