CFD Online Discussion Forums

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

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 openfoam.org, 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: http://www.openfoam.org/download/ubuntu.php

Replace the first step with these instructions instead:
Code:

VERS=$(lsb_release -cs)     
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $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,
Bruno

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 http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list"
[sudo] password for cesar:
cesar@cesar-VirtualBox:~$
cesar@cesar-VirtualBox:~$ sudo apt-get update
Ign http://extras.ubuntu.com precise InRelease
Ign http://security.ubuntu.com precise-security InRelease
Ign http://www.openfoam.org precise InRelease
Ign http://co.archive.ubuntu.com precise InRelease
Ign http://co.archive.ubuntu.com precise-updates InRelease
Ign http://co.archive.ubuntu.com precise-backports InRelease
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://extras.ubuntu.com precise Release.gpg
Ign http://www.openfoam.org precise Release.gpg
Hit http://extras.ubuntu.com precise Release
Hit http://security.ubuntu.com precise-security Release
Hit http://co.archive.ubuntu.com precise Release.gpg
Ign http://www.openfoam.org precise Release
Ign http://www.openfoam.org precise/main i386 Packages/DiffIndex
Hit http://co.archive.ubuntu.com precise-updates Release.gpg
Hit http://extras.ubuntu.com precise/main Sources
Hit http://security.ubuntu.com precise-security/main Sources
Ign http://www.openfoam.org precise/main TranslationIndex
Hit http://extras.ubuntu.com precise/main i386 Packages
Ign http://extras.ubuntu.com precise/main TranslationIndex
Hit http://co.archive.ubuntu.com precise-backports Release.gpg
Hit http://security.ubuntu.com precise-security/restricted Sources
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/multiverse Sources
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://security.ubuntu.com precise-security/restricted i386 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://co.archive.ubuntu.com precise Release
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://co.archive.ubuntu.com precise-updates Release
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://co.archive.ubuntu.com precise-backports Release
Hit http://co.archive.ubuntu.com precise/main Sources
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Hit http://co.archive.ubuntu.com precise/restricted Sources
Hit http://co.archive.ubuntu.com precise/universe Sources
Hit http://co.archive.ubuntu.com precise/multiverse Sources
Hit http://co.archive.ubuntu.com precise/main i386 Packages
Hit http://security.ubuntu.com precise-security/universe Translation-en
Hit http://co.archive.ubuntu.com precise/restricted i386 Packages
Hit http://co.archive.ubuntu.com precise/universe i386 Packages
Hit http://co.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://co.archive.ubuntu.com precise/main TranslationIndex
Hit http://co.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://co.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://co.archive.ubuntu.com precise/universe TranslationIndex
Hit http://co.archive.ubuntu.com precise-updates/main Sources
Hit http://co.archive.ubuntu.com precise-updates/restricted Sources
Hit http://co.archive.ubuntu.com precise-updates/universe Sources
Hit http://co.archive.ubuntu.com precise-updates/multiverse Sources
Hit http://co.archive.ubuntu.com precise-updates/main i386 Packages
Hit http://co.archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://co.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://co.archive.ubuntu.com precise-updates/multiverse i386 Packages
Hit http://co.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://co.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://co.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://co.archive.ubuntu.com precise-updates/universe TranslationIndex
Ign http://extras.ubuntu.com precise/main Translation-en_US
Hit http://co.archive.ubuntu.com precise-backports/main Sources
Hit http://co.archive.ubuntu.com precise-backports/restricted Sources
Hit http://co.archive.ubuntu.com precise-backports/universe Sources
Hit http://co.archive.ubuntu.com precise-backports/multiverse Sources
Ign http://extras.ubuntu.com precise/main Translation-en
Hit http://co.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://co.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://co.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://co.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://co.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://co.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://www.openfoam.org precise/main i386 Packages
Hit http://co.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://co.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://co.archive.ubuntu.com precise/main Translation-en
Hit http://co.archive.ubuntu.com precise/multiverse Translation-en
Hit http://co.archive.ubuntu.com precise/restricted Translation-en
Hit http://co.archive.ubuntu.com precise/universe Translation-en
Hit http://co.archive.ubuntu.com precise-updates/main Translation-en
Hit http://co.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://co.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://co.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://co.archive.ubuntu.com precise-backports/main Translation-en
Hit http://co.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://co.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://co.archive.ubuntu.com precise-backports/universe Translation-en
Ign http://www.openfoam.org precise/main Translation-en_US
Ign http://www.openfoam.org precise/main Translation-en
Reading package lists... Done
cesar@cesar-VirtualBox:~$
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:~$
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:~$
cesar@cesar-VirtualBox:~$ icoFoam -help
icoFoam: command not found
cesar@cesar-VirtualBox:~$

help needed,,,thanks so much

wyldckat September 2, 2012 14:51

Hi Cesar,

Ha AH! The culprit line finally shows itself ;)
Quote:

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:
    Code:

    fi

    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:
    Code:

    icoFoam -help
    It should work from now on!

Have fun!
Bruno


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