I downloaded Ubuntu 14.04.2.LTS. When I came to load and compile OpenFOAM-2.4.0 it says cmake, flex, bison, qt4 and OpenMPI are not installed.Today I downloaded those files and are in my home directory.So question is how do I compile those or get them into Ubuntu? Please can someone help with the information I have given.
It's probably easier do download and install these packages from the official Ubuntu repositories. Try executing this command in a terminal:
sudo apt-get install openmpi-bin libopenmpi-dev cmake flex bison libqt4-dev
You can also install OpenFOAM directly via their package repository, which already contains version 2.4.0, and will install the required dependencies automatically. From the OpenFOAM website:
VERS=$(lsb_release -cs) sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list" sudo apt-get update sudo apt-get install openfoam240