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.com] Problem installing Openfoam from source. Allwmake doesn't work (https://www.cfd-online.com/Forums/openfoam-installation/211984-problem-installing-openfoam-source-allwmake-doesnt-work.html)

artymk4 November 23, 2018 09:48

Problem installing Openfoam from source. Allwmake doesn't work
 
I have Ubuntu and I installed OpenFOAM from source. It is installed in /home/<user>/OpenFOAM/OpenFOAM-v1806


When I run "icoFoam -help" in Terminal, I get this:
Code:

Command 'icoFoam' not found, but can be installed with:

sudo apt install openfoam

I manually edited file /home/<user>/.bashrc and added this at the end:
source ~/OpenFOAM/OpenFOAM-v1806/etc/bashrc


After some reading I found out I might need to compile Openfoam first. So I ran ./Allwmake and got this error. What am I doing wrong?
Code:

$ ./Allwmake
========================================
2018-11-23 15:43:15 +0100
Starting OpenFOAM-v1806
  Gcc system compiler
  linux64GccDPInt32Opt, with SYSTEMOPENMPI openmpi-system

flex -o /home/ubuntwo/OpenFOAM/OpenFOAM-v1806/wmake/platforms/linux64Gcc/wmkdep.c wmkdep.l && gcc -m64 -DOPENFOAM=1806 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3  -fPIC /home/ubuntwo/OpenFOAM/OpenFOAM-v1806/wmake/platforms/linux64Gcc/wmkdep.c -o /home/ubuntwo/OpenFOAM/OpenFOAM-v1806/wmake/platforms/linux64Gcc/wmkdep
/bin/sh: 1: flex: not found
Makefile:76: recipe for target '/home/ubuntwo/OpenFOAM/OpenFOAM-v1806/wmake/platforms/linux64Gcc/wmkdep' failed
make: *** [/home/ubuntwo/OpenFOAM/OpenFOAM-v1806/wmake/platforms/linux64Gcc/wmkdep] Error 127


wyldckat December 4, 2018 17:03

Quick answer: "flex not found" means that the "flex" package hasn't been installed. You should follow the instructions given here: https://www.openfoam.com/documentati...quirements.php - it's indicated at the start of the instructions for source code page that you provided ;)


All times are GMT -4. The time now is 04:33.