Installation of OpenFOAM-2.4.0 in Ubuntu 20.4
Dear All,
Please, I would like to ask, if any of you knows any guide lines, step by step tutorial on how to install OpenFOAM-2.4.0 in Ubuntu 20.4? Thanks in advance |
Quote:
That version of OpenFOAM is really very old (5-1/2 years). If you try to compile it with the gcc that comes with Ubuntu 20.04 you will find a large number of places where the compiler complains about things that much old compilers did not complain about. If you absolutely must use that particular version of OpenFOAM, then either be prepared for quite a bit of manual effort to fix various problems that have already been fixed or changed in OpenFOAM in those last 5 years. However, since you are asking specifically for a "step-by-step tutorial", I think you will be completely overwhelmed by that task. Another alternative would be use a docker image or equivalent of a 5-6 year old Linux system to run that particular version of OpenFOAM. I don't think that you will get past needing to upgrade to a newer OpenFOAM version. Or simply install an OpenFOAM binary pack for Ubuntu 20.04 and go from there: https://develop.openfoam.com/Develop...ompiled/debian |
How important is Ubuntu 20? I have it working on 18.04.
|
I've done it more or less on ubuntu 20.04.
You have to add some old repisoteries from xenial where gcc 4.8 where available in your /etc/apt/sources.list.d/official-package-repositories.list (I use linux mint based on 20.04 thus in a true ubuntu this file may have a different name) Code:
deb http://archive.ubuntu.com/ubuntu xenial main Then install: sudo apt update sudo apt install gcc-4.8 g++-4.8 Then switch your environement variable to gcc-4.8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 1 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4 1 Then you may have to compile one time, have a lot of error from flex because you use mostly a flex which have been compiled with gcc9 then this post helps. I've now few librairies that doesn't compile but i don't use them. |
All times are GMT -4. The time now is 06:28. |