CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Debian package for ubuntu 810 (

deepblue17 February 6, 2009 05:16

Hello, I've packed OpenFOAM

I've packed OpenFOAM-1.5 for Ubuntu 8.10. You can get the debian package from my PPA:

OpenFOAM-1.5 is installed into /usr/lib/OpenFOAM-1.5

In order to set the OpenFOAM paths correctly, you should add this line to your ~/.bashrc:

startOF15="source /usr/lib/OpenFOAM-1.5/etc/bashrc"

and each time you want to use OpenFOAM you have to execute "startOF15".

If you have installed another debian based distribution, you should be able (in theory) to compile the openfoam source package, if you follow these instructions ( In practice I've got actually problems with gcc-4.3.2, see therefor (

Furthermore you will also find a paraview-3.4.0 debian package with the patch from Takuya OSHIMA ( If you will install this paraview package, paraFoam should work properly.

paulo February 6, 2009 08:06

Great job, Oliver! Thanks!
Great job, Oliver! Thanks!

I have one further question: Is this package the 1.5.x compiled or the native 1.5 ?

Congratulations again!

Paulo Rocha

deepblue17 February 7, 2009 09:36

Hello Paulo, I applied all
Hello Paulo,

I applied all patches from openfoam-extend: FD_Release/OpenFOAM-1.5_patch/

And as I know, these included all from the git and therefore this should be 1.5.X, if you want to call it so.

One note to start OpenFOAM, you must add

alias startOF15="source /usr/lib/OpenFOAM-1.5/etc/bashrc"

to your ~/.bashrc.

paulo February 8, 2009 07:33

Hello Oliver, I finally fin
Hello Oliver,

I finally finished testing in my system (32 bits) and it worked flawlessly.

Hope you have time to let the packages up to date.

Congratulations again!


Paulo Rocha

hamcer February 8, 2009 13:05

Hello! I used ubuntu 8.10 ,

I used ubuntu 8.10 , and, I done the script installation for OF-1.5 created by Jure Lakovic , but, when I run this script I show somme warninng like this:
fqchar.h:59: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:60: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:239: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:240: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:241: warning: type qualifiers ignored on function return type
painting/qpdf.cpp:1567: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1573: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1575: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1583: warning: deprecated conversion from string constant

*2nd thing, I didn't show the Qt icons in the star menu

but when i run qtdemo, it works,
also the tutorials of OF examples worked well and, i can display the paraview to show them, also when I run foamInstallationTest is crashed

I didn't know if my installation is complete or no!!

Thanks in advance for your help.

hellorishi February 20, 2009 10:31

Hello Oliver, I appreciate
Hello Oliver,

I appreciate your initiative and effort for making OF-1.5 easier to install.

I tried to install using this on Ubuntu-8.10, however something went wrong after installation. My trackpad and keyboard stopped responding (except Ctrl+Alt+Del) and I had to reinstall Ubuntu again. I guess it was some problem due to QT.

Please consider this feedback in the right spirit


deepblue17 February 21, 2009 08:30

Hello Rishi, I don't think
Hello Rishi,

I don't think that the openfoam package was responsible for that problem. And I also don't think, that Qt, which is dropped in by paraview, caused the problem.

Therefore I assume, that you have done some updates and Ubuntu in general has had some problems with the X-Server. You can check the bugs at If you search after e.g. "freeze after login" you will find some.
So I suggest for the future, that you login at tty1 (Ctrl+Alt+F1) and do:

sudo apt-get update
sudo apt-get upgrade

In order to update broken packages. After that, you should be able to login again into your desktop.

Nevertheless, if you give the packages another try and you will get the same problems. Let me know, I'm also interested in finding the bug.


pg22 February 24, 2009 13:16

Hello Oliver, I am planning
Hello Oliver,

I am planning on installing the debian packages for OpenFOAM and Paraview on an Ubuntu 8.10 (Intrepid) system.

I would like to check the prerequisites for Paraview 3.4. In particular, which version of Qt is required?

Should it be 4.3.x, as mentioned in the README file, or should it be 4.4.3, as in the standard intrepid distribution?

In synaptic package manager is the relevant package libqt4-dev?

Many thanks,


deepblue17 February 24, 2009 14:00

Hello Paul, if you want to
Hello Paul,

if you want to compile the paraview package at your own, than you have to install the libqt4-dev package.

But if you just want to install the compiled paraview debian package, your package manager (apt-get, aptitude, synaptic or adept) will drop all required dependencies with the right version number in. And you do not have to take care of that. That's the big advantage of packaging things. ;-)

Hope I could help a little bit.

jed February 25, 2009 16:43

Oliver, you seem to have manag
Oliver, you seem to have managed to get OpenFOAM to install like a reasonable package (i.e. not insist on a custom version of everything prohibiting interoperability with the rest of the universe). The .diff for your package is almost 200k lines, presumably not all of which is required to get sane installation.

Do you have any advice an the minimum amount of effort required to build against system versions of third-party packages and install in a reasonable manner (/opt/openfoam is fine). If it's a manageable amount of effort, I'll provide an Archlinux package.

deepblue17 March 1, 2009 15:10

Hello Jed, according to the
Hello Jed,

according to the FHS /opt/openfoam is not a proper place. Binaries should go into /usr/bin, libraries into /usr/lib; header files into /usr/include and tutorials, documentation, into /usr/share.

Currently I'm thinking about changing the installation directories of my debian package.

jed March 3, 2009 08:30

Oliver, the FHS is a Debian th
Oliver, the FHS is a Debian thing. The Archlinux convention is to put big "standalone" packages (such as opencascade, wine, google-earth, acrobat) in /opt/$pkgname, while packages that play nicely with others go in /usr.

My question was how much effort is required to build OpenFOAM against system packages and install in a reasonable manner, even if it is /opt/openfoam. The OF repository unfortunately makes pretty hard assumptions about being bundled with it's own universe. Your patch-set for Debian is enormous and obviously has plenty of code patches pulled from other repositories, but using system packages and installing sensibly isn't restricted to one place so it's time-consuming to grok.

cpbrock3 March 9, 2009 22:02

I have a noob question. I'm j
I have a noob question. I'm just interested in getting to the point where I can use the program. I got the 'package' to install using the script into this directory.
OpenFOAM-1.5 is installed into /usr/lib/OpenFOAM-1.5

Then I installed some paraview package. But I have no idea what this stuff means about setting the paths on this ~/.bashrc.

This Part<
In order to set the OpenFOAM paths correctly, you should add this line to your ~/.bashrc:

startOF15="source /usr/lib/OpenFOAM-1.5/etc/bashrc"

and each time you want to use OpenFOAM you have to execute "startOF15". >

Can you put this in stupid people terms for me. I am tired of fighting with ubuntu.

Thank you for the help.

deepblue17 March 10, 2009 04:47

Hello Carter, do you have a
Hello Carter,

do you have also checked the wiki pages?

You are missing the alias (see here) in front of the line. And you have to execute startOF15 without the quotation marks.

Hope, that helps. If not, please inform me.

deepblue17 March 10, 2009 05:53

Hello Jed, FHS is not a deb
Hello Jed,

FHS is not a debian thing, all major distributions, at least those who are LSB certificated, are conform to the FHS.

I don't know how long you will need to get OpenFOAM packaged against system packages. Based on my knowledge from the gentoo ebuilds, I needed about 20 hours for the debian packages. The problem is also the long compile time of OpenFOAM, in order to check, that there are no compilation/linking errors.

zaleksf March 10, 2009 08:19

Thanks for your efforts Oliver
Thanks for your efforts Oliver! I'm looking forward to using these packages.

I am having difficulty downloading the packages, however. They simply won't download. I have successfully performed this kind of operation before, installing OpenOffice 3.0.1, etc.

I have successfully added the package repositories to my sources list:

deb intrepid main
deb-src intrepid main

and I have successfully added the linked import key for those sources:

Version: SKS 1.0.10

mI0ESXif3gEEAPLdfaHYC4cRZPygScbFZ7h0m33cRTeMeN32Mp WgtWojsPcKok8KEF83EPNy
qj8DQQwD6Y19rLxmm8kp4dkLACpm1z+x4SqteBxZ28RVXfakOG PaoPH72QtZW/vlrHQG6jhk

Any thoughts would be much appreciated.

Best regards

zaleksf March 10, 2009 08:57

Thanks for your prompt reply,
Thanks for your prompt reply, Oliver.

I am running Ubuntu 8.10 (Intrepid). I meant to imply that I have used this manal process before, and that it has worked for me on other packages. It may be that I do have a package manage problem. I'm not sure how to check for that, except that I have run a test by installing a small app from the Application Add/Remove list - all worked fine.

zaleksf March 10, 2009 10:40

Oliver, Please excuse my ig

Please excuse my ignorance - I've successfully downloaded and installed all of the recommendaed packages, and added

alias startOF15="source /usr/lib/OpenFOAM-1.5/etc/bashrc" to the ~/.bashrc file.

I ran the foamInstallationTest and received the following error:

zaleksf@zaleksf-laptop:~$ startOF15
zaleksf@zaleksf-laptop:~$ cd /usr/lib/OpenFOAM-1.5/bin
zaleksf@zaleksf-laptop:/usr/lib/OpenFOAM-1.5/bin$ foamInstallationTest
Executing /usr/lib/OpenFOAM-1.5/bin/foamInstallationTest:

Checking basic setup...

FATAL ERROR: OpenFOAM environment not configured.

Please refer to the installation section of the README file:
to source the OpenFOAM environment.

I'm looking for the README file referred to to set the environment. Thoughts?


deepblue17 March 10, 2009 11:50

Hello Steven, this is a bug
Hello Steven,

this is a bug in the foamInstallationTest script, because the $WM_THIRD_PARTY_DIR variable is not set as we don't need them. Just change line 388 into

if [ ! -d "$WM_PROJECT_INST_DIR" ]; then

Furthermore you can ignore the critical error with gcc, because we are using the System gcc, as set in the ${WM_PROJECT_DIR}/etc/ and therefore the ${WM_COMPILER_DIR} variable is not set. Or you change line 510 by hand.

pg22 March 11, 2009 08:31

Hello Oliver, Steven, I hav
Hello Oliver, Steven,

I have downloaded the debian packages of OpenFOAM and Paraview and it's working fine.

My experience of running foamInstallationTest was the same; the absence of the $WM_THIRD_PARTY_DIR variable caused the script to give the FATAL ERROR. I commented out the function checkOpenFOAMEnvironment and the script was able to run. As well as the absence of the $WM_COMPILER_DIR variable I noticed that $MPI_ARCH_PATH (set to /usr/lib/openmpi) is not on $LD_LIBRARY_PATH. Is this necessary for parallel runs?

I found that I was able to run the cavity tutorial without errors. I copied the tutorials (examples) directory tree to my $HOME directory first. The writing error you listed may be simply the permissions on the /usr/share/... directory.

One aspect of running Paraview that I noticed was the flashing of the main window when the cursor loses focus. I found (on this forum) that the problem had been encountered before and the solution is switching off the visual effects in System->Preferences->Appearance.

Lastly, I noticed that the Paraview help icon gives an error, complaining that the $PARAVIEW_HELP variable needs to be set. I haven't found where to do this yet.

Other than that, all is working well. The /usr/lib/... and /usr/share/... installation seems a more natural location to put the main software, leaving the home directory free for data files.

All times are GMT -4. The time now is 22:18.