CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM installation (

cesarjets August 26, 2012 18:44

OpenFOAM installation
I have had a lot of trouble installing openfoam, v211, I have gone through the whole process with the instructions given on, but always get "help command not found" after typing in th terminal iconFoam -help. I didn't have any problem with the vitual machine and ubuntu installation. I will appreciate any help on this, thanks.

wyldckat August 27, 2012 06:18

Greetings cesarjets and welcome to the forum!

OK, not much to go on with your description once again ;)
I'm assuming you've followed these instructions:

Replace the first step with these instructions instead:

VERS=$(lsb_release -cs)     
sudo sh -c "echo deb $VERS main > /etc/apt/sources.list.d/openfoam.list"

Then follow the remaining steps once again. If there is any error shown, please copy-paste them on your next post. In the terminal windows, you can select with the mouse and copy with the key combination Ctrl+Shift+C.

Best regards,

cesarjets September 2, 2012 12:11

Openfoam installation
Bruno, Thanks so much for your reply. I am still having the same problem,
this is what I have typed and got in the terminal

bash: /home/cesar/.bashrc: line 107: syntax error near unexpected token `source'
bash: /home/cesar/.bashrc: line 107: `fi source /opt/openfoam211/etc/bashrc'
cesar@cesar-VirtualBox:~$ clear all
cesar@cesar-VirtualBox:~$ VERS=$(lsb_release -cs)
cesar@cesar-VirtualBox:~$ sudo sh -c "echo deb $VERS main > /etc/apt/sources.list.d/openfoam.list"
[sudo] password for cesar:
cesar@cesar-VirtualBox:~$ sudo apt-get update
Ign precise InRelease
Ign precise-security InRelease
Ign precise InRelease
Ign precise InRelease
Ign precise-updates InRelease
Ign precise-backports InRelease
Hit precise-security Release.gpg
Hit precise Release.gpg
Ign precise Release.gpg
Hit precise Release
Hit precise-security Release
Hit precise Release.gpg
Ign precise Release
Ign precise/main i386 Packages/DiffIndex
Hit precise-updates Release.gpg
Hit precise/main Sources
Hit precise-security/main Sources
Ign precise/main TranslationIndex
Hit precise/main i386 Packages
Ign precise/main TranslationIndex
Hit precise-backports Release.gpg
Hit precise-security/restricted Sources
Hit precise-security/universe Sources
Hit precise-security/multiverse Sources
Hit precise-security/main i386 Packages
Hit precise-security/restricted i386 Packages
Hit precise-security/universe i386 Packages
Hit precise-security/multiverse i386 Packages
Hit precise-security/main TranslationIndex
Hit precise-security/multiverse TranslationIndex
Hit precise-security/restricted TranslationIndex
Hit precise Release
Hit precise-security/universe TranslationIndex
Hit precise-updates Release
Hit precise-security/main Translation-en
Hit precise-security/multiverse Translation-en
Hit precise-backports Release
Hit precise/main Sources
Hit precise-security/restricted Translation-en
Hit precise/restricted Sources
Hit precise/universe Sources
Hit precise/multiverse Sources
Hit precise/main i386 Packages
Hit precise-security/universe Translation-en
Hit precise/restricted i386 Packages
Hit precise/universe i386 Packages
Hit precise/multiverse i386 Packages
Hit precise/main TranslationIndex
Hit precise/multiverse TranslationIndex
Hit precise/restricted TranslationIndex
Hit precise/universe TranslationIndex
Hit precise-updates/main Sources
Hit precise-updates/restricted Sources
Hit precise-updates/universe Sources
Hit precise-updates/multiverse Sources
Hit precise-updates/main i386 Packages
Hit precise-updates/restricted i386 Packages
Hit precise-updates/universe i386 Packages
Hit precise-updates/multiverse i386 Packages
Hit precise-updates/main TranslationIndex
Hit precise-updates/multiverse TranslationIndex
Hit precise-updates/restricted TranslationIndex
Hit precise-updates/universe TranslationIndex
Ign precise/main Translation-en_US
Hit precise-backports/main Sources
Hit precise-backports/restricted Sources
Hit precise-backports/universe Sources
Hit precise-backports/multiverse Sources
Ign precise/main Translation-en
Hit precise-backports/main i386 Packages
Hit precise-backports/restricted i386 Packages
Hit precise-backports/universe i386 Packages
Hit precise-backports/multiverse i386 Packages
Hit precise-backports/main TranslationIndex
Hit precise-backports/multiverse TranslationIndex
Hit precise/main i386 Packages
Hit precise-backports/restricted TranslationIndex
Hit precise-backports/universe TranslationIndex
Hit precise/main Translation-en
Hit precise/multiverse Translation-en
Hit precise/restricted Translation-en
Hit precise/universe Translation-en
Hit precise-updates/main Translation-en
Hit precise-updates/multiverse Translation-en
Hit precise-updates/restricted Translation-en
Hit precise-updates/universe Translation-en
Hit precise-backports/main Translation-en
Hit precise-backports/multiverse Translation-en
Hit precise-backports/restricted Translation-en
Hit precise-backports/universe Translation-en
Ign precise/main Translation-en_US
Ign precise/main Translation-en
Reading package lists... Done
cesar@cesar-VirtualBox:~$ sudo apt-get install openfoam211
Reading package lists... Done
Building dependency tree
Reading state information... Done
openfoam211 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
cesar@cesar-VirtualBox:~$ sudo apt-get install paraviewopenfoam3120
Reading package lists... Done
Building dependency tree
Reading state information... Done
paraviewopenfoam3120 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
cesar@cesar-VirtualBox:~$ gedit ~/.bashrc
cesar@cesar-VirtualBox:~$ bash: /home/cesar/.bashrc: line 107: syntax error near unexpected token `source'
bash: /home/cesar/.bashrc: line 107: `fi source ./opt/openfoam211/etc/bashrc'
cesar@cesar-VirtualBox:~$ icoFoam -help
icoFoam: command not found

help needed,,,thanks so much

wyldckat September 2, 2012 14:51

Hi Cesar,

Ha AH! The culprit line finally shows itself ;)

fi source ./opt/openfoam211/etc/bashrc
Steps to fix this:
  1. Edit the file "/home/cesar/.bashrc" once again.
  2. Find the line I quoted.
  3. Break it into the following lines:


    source /opt/openfoam211/etc/bashrc

    Notice that I removed the dot on the left to "/opt". And don't forget the "fi" command, because it belongs to the commands above it!
  4. Make sure that the last line is the only time it occurs in the file indicated in the first point!
  5. Save the file and close.
  6. Start a new terminal and run:

    icoFoam -help
    It should work from now on!

Have fun!

All times are GMT -4. The time now is 23:03.