openfoam v2006 wsl2 ubuntu 20.04 GLIBCXX_3.4.26 not found
Since I installed according to the guide (https://openfoam.com/download/install-windows-10.php) wsl2 ubuntu 20.04, I've been having errors related to libstc++.so.6, specifically GLIBCXX_3.4.26 not found (required by ...) where ... refers to different files within /opt/OpenFOAM/ThirdParty-v2006/platforms/linux64/gcc-6.3.0/lib64/ ending with .so, .so.1, .so.6 and so on (for instance, when running paraFoam the error would appear with respect to about 20 such files). I am able to successfully visualize the cavity tutorial (in paraview installation on windows).
I could get the errors to go away by doing what the user laborg suggested on Jan 4 for a similar problem with julia (see https://discourse.julialang.org/t/gl...rcall/29113/10), specifically copy libstdc++.so.6 from /usr/lib/x86_64-linux-gnu to /opt/OpenFOAM/ThirdParty-v2006/platforms/linux64/gcc-6.3.0/lib64/. The questions is whether this copy-paste solution is recommended or a different methods is more appropriate; will the solution to the errors come back and haunt me later? Is the libstdc++.so.6 from system installation going to be an issue if used in the lib64 folder of openfoam? An additional info concerning openfoam installation, foamInstallationTest shows *not installed* errors against flex, wmake, gcc, g++, icoFoam and *critical error* for gcc, g++, icoFoam; but I as see here: https://www.cfd-online.com/Forums/op...ationtest.html, foamInstallationTest is not meant for installation from the tar file. Openfoam installation seems to be alright based on the running of the cavity tutorial. |
It's not recommended to use lib by copy-paste.
add lib path to environment, like $LD_LIBRARY; and tell the compiler software(make/wmake) where to load lib. (By modify make/option(make) for once wmake OR somewhere I don't know to change every wmake.) OR this 64 bit lib path form "/usr/lib/x86_64-linux-gnu" is used by debian-based OS. and redhat-based OS is different("/usr/lib64"). while some compiler setting is assumed to work with redhat-based OS. you could put a soft link, /usr/lib64/libstdc++.so.6, link to /usr/lib/x86_64-linux-gnu/libstdc++.so.6 |
All times are GMT -4. The time now is 23:51. |