CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Installation of OpenFOAM-2.4.0 in Ubuntu 20.4

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2021, 05:22
Default Installation of OpenFOAM-2.4.0 in Ubuntu 20.4
  #1
New Member
 
Samir
Join Date: May 2012
Posts: 14
Rep Power: 13
samegypt is on a distinguished road
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
samegypt is offline   Reply With Quote

Old   July 5, 2021, 11:11
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by samegypt View Post
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



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
olesen is offline   Reply With Quote

Old   September 30, 2021, 16:24
Default
  #3
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
How important is Ubuntu 20? I have it working on 18.04.
joshmccraney is offline   Reply With Quote

Old   December 16, 2021, 23:38
Default
  #4
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
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
deb  http://archive.ubuntu.com/ubuntu xenial universe

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.
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. »
Voulet is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] Can't find installation instruction for Openfoam 2.4.x , on Ubuntu 16.04 titanium OpenFOAM Installation 14 February 20, 2020 11:46
[OpenFOAM.org] OpenFOAM 7 installation on ubuntu 16.04 LTS kerim OpenFOAM Installation 2 October 10, 2019 00:04
[swak4Foam] swak4foam 0.3.2 installation problem on Ubuntu 15.04 with OpenFOAM 2.4.0 ptsxx OpenFOAM Community Contributions 1 January 10, 2016 17:48
Problem? with Installation of OpenFOAM 2.1.0 on to Ubuntu 10.4.4 VirtualBox Stubby OpenFOAM Installation 8 March 5, 2012 15:12
openFOAM installation in ubuntu 11.10 kirubhakaran OpenFOAM Installation 5 February 17, 2012 02:16


All times are GMT -4. The time now is 16:49.