
A summary of FAQ that I met when installing OpenFOAM and third parties is made here.
1. Degrade the version of gcc (gcc-4.8 is used for example)
Firstly, install gcc-4.8 with the command:
1 |
$ sudo apt-get install gcc-4.8 |
Secondly, set the default gcc version:
1 |
$ gcc --version |
That’s all. We can type in gcc --version again to make sure the version of gcc is degraded.
2. Degrade the version of g++
Just refer to the method of degrading gcc and replace all the ‘gcc’ with ‘g++’.
3. Degrade the version of flex (found necessary in OpenFOAM-3.0.0)
Type in the command:
1 |
$ sudo apt-get install flex-old |
4. Install OpenFOAM with normal process
Methods of installing OpenFOAM by compilation can be found in OpenFOAM-Wiki
Error: ‘yywrap’ when compiling OpenFOAM-3.0.0
It is mainly the problem of the version of flex, try degrading flex with the command:
1 |
$ sudo apt-get install flex-old |
Error: ‘parent directory does not allow write permission’ when compiling Thirdparty
It is the problem of access permission, just upgrade the privilege by:
1 |
sudo chown -R $(id-un):$(id-gn) $WM_PROJECT_USER_DIR |
Install PyFoam
1. Install the python-numpy
Type in the following command:
1 |
$ sudo apt-get install python-numpy |
2. Download the up-to-date version of PyFoam
It can be found in OpenFOAM-Wiki
3. Final installation
Open the PyFoam folder and type in the command:
1 |
sudo python setup.py install |




近期评论