CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Installation on Ubuntu 12.04 LTS (

samiam1000 May 1, 2012 07:34

Installation on Ubuntu 12.04 LTS
Dear all,

I am going to install OpenFOAM 2.1.

It seems, from here, that it is not still available the pre-built edition for Ubuntu 12.04.

Is that right?

When will it be available?

Thanks a lot,


wyldckat May 1, 2012 11:10

Greetings Samuele,

I'm going to quote myself from another thread:

Originally Posted by wyldckat (Post 358268)
you can try using the packages that are meant for 11.10, by running the following command:

sudo sh -c "echo deb oneiric main > /etc/apt/sources.list.d/openfoam.list"

Possibly the official OpenFOAM deb packages for Ubuntu 12.04 will only be released with the next big release of OpenFOAM 2.2, which should occur somewhere between June and July, if we compare with the dates of previous releases. This way they can validate if things still work as expected.

Best regards,

samiam1000 May 1, 2012 15:29

Dear Bruno,

I successefully installed OF2.1 on Ubuntu 12.04.

The point is that I haven't been able to set paraview. I install it, but it seems that some links to the different libraries are missing.

Any hint?

wyldckat May 2, 2012 06:24

Don't have much time...

Install ParaView from Ubuntu:

sudo apt-get install paraview
and use:

paraFoam -builtin

samiam1000 May 2, 2012 06:26

Thanks a lot!

fisch May 9, 2012 07:53

samiam, you didn't get any error compiling OpenFoam on ubuntu12.04?
or did you fix it somehow?

my problem is described here:

Do you have any idea?

thanks a lot

samiam1000 May 9, 2012 07:59


I have not compiled it, but I have installed the .deb packages.. And everything seems to work properly.

The only problem I had was with paraview, but I solved it following Bruno's hints.

I am sorry I can't help you further.


noshirvan May 21, 2012 15:11

install openfoam 2.1 and openfoam 1.6ext
how i can install openfoam 2.1 and openfoam 1.6ext in my laptop?

samiam1000 May 22, 2012 03:02

Which distro are you running?

noshirvan May 22, 2012 03:48

I'm installed ubunto 12.04 but can install ubuntu 12.04 and ubuntu 10.04 or fedora 16.

JonW May 24, 2012 12:33

OpenFOAM 2.1.x and 2.0.x on the Ubuntu 64bit server edition
Dear foamers
I have installed the server edition of the ubuntu 12.04 STL on two of my computers. Really nice if you like your Linux clean and lean (you can install xorg and thereafter fluxbox (sudo apt-get install xorg fluxbox), which I did [use startx to start the X11]). Note during ubuntu installation you don't have to install or activate any servers (I didn't). Both OF 2.0.x as well as 2.1.x compile without any problems. I followed the "git" instructions of the page.

It goes something like this (for the OF 2.1.x):

sudo apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libxt-dev
sudo apt-get install fort77
sudo apt-get install libscotch-dev libopenmpi-dev
apt-get install git-core
reboot just in case
cd ~/OpenFOAM
git clone git://

download ThirdParty-2.1.0.tgz
tar xzf ThirdParty-2.1.0.tgz
mv ThirdParty-2.1.0 ThirdParty-2.1.x
source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc
export WM_NCOMPPROCS=$(cat /proc/cpuinfo | grep processor | wc -l)
(7) (if foamSystemCheck reports ok, which it should)

./Allwmake | tee wmake_log_file.txt
open new terminal
source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc

open new terminal (just in case)
source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc

cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
(10) (optional, if you have yet to create these dirs)
mkdir -p $FOAM_RUN

and then your are set up (hopefully),... anyway worked for me:)
Hope this is of help

elvis May 26, 2012 05:54


Originally Posted by noshirvan (Post 362276)
how i can install openfoam 2.1 and openfoam 1.6ext in my laptop?

Hi Noshirvan,

your .bashrc should contain
alias startOF16ext='unset FOAM_INST_DIR;unset WM_PROJECT_USER_DIR;unset WM_THIRD_PARTY_DIR;source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc'
alias startOF21='unset FOAM_INST_DIR;unset WM_PROJECT_USER_DIR;unset WM_THIRD_PARTY_DIR;source /opt/openfoam21/etc/bashrc'
ofcourse the path should point to the real places on your computer

on console you can switch to openfoam 1.6ext or openfoam 2.1 just by typing startOF16ext or startOF21

All times are GMT -4. The time now is 20:37.