Ubuntu18.0 安装 foam-extend-4.0

1、Run the following commands:

sudo apt-get update
sudo apt-get install git-core build-essential binutils-dev cmake flex bear \

zlib1g-dev libncurses5-dev libreadline-dev \
libxt-dev rpm mercurial graphviz python python-dev python3 python3-dev gcc-5 g++-5 \
gnuplot gnuplot-qt gnuplot-data
2、Get the source code
cd ~
mkdir foam
cd foam
git clone git://git.code.sf.net/p/foam-extend/foam-extend-4.0 foam-extend-4.0

3、compile
cd ~/foam/foam-extend-4.0
echo export WM_THIRD_PARTY_USE_BISON_27=1  >> etc/prefs.sh
echo "export WM_CC='gcc-5'"  >> etc/prefs.sh
echo "export WM_CXX='g++-5'"  >> etc/prefs.sh
source etc/bashrc
echo "alias fe40='source \$HOME/foam/foam-extend-4.0/etc/bashrc'" >> $HOME/.bashrc
//运行case前要输入fe40,用来管理多版本foam

sed -i -e 's=rpmbuild --define=rpmbuild --define "_build_id_links none" --define=' ThirdParty/tools/makeThirdPartyFunctionsForRPM
sed -i -e 's/gcc/\$(WM_CC)/' wmake/rules/linux64Gcc/c
sed -i -e 's/g++/\$(WM_CXX)/' wmake/rules/linux64Gcc/c++
./Allwmake.firstInstall

参考链接:http://openfoamwiki.net/index.php/Installation/Linux/foam-extend-4.0/Ubuntu
openfoamwiki.net/index.php/Installation/Linux/foam-extend-4.0#Installing_from_source_code


posted on 2020-10-14 23:21  Yan12345678  阅读(780)  评论(0编辑  收藏  举报

导航