Ubuntu 20.04 安装 OpenFOAM-v1712
-
@chengan-wang 我有时候也遇到过这个问题 来回操作几次就解决了 目前不知道原因 不过还可以不算麻烦
-
@chengan-wang 2.4版本需要安装gcc/g++-4.8 你试试
-
@chengan-wang 你用的低版本g++么,我装的更低版本的openfoam-2.1都没问题呢
-
@chengan-wang log提示什么错误
-
@李东岳 李老师,编译过程出现了很多错误:
== Generating build files == Configuring libCGAL -- Requested component: MPFR -- Requested component: GMP libCGAL is configured -- Sources for CGAL component library 'CGAL_Core/CMakeLists.txt' detected CMake Error at src/CMakeLists.txt:81 (add_subdirectory): add_subdirectory given source "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Core/CMakeLists.txt" which is not an existing directory. Call Stack (most recent call first): src/CMakeLists.txt:140 (configure_component) -- Sources for CGAL component library 'CGAL_ImageIO/CMakeLists.txt' detected CMake Error at src/CMakeLists.txt:81 (add_subdirectory): add_subdirectory given source "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt" which is not an existing directory. Call Stack (most recent call first): src/CMakeLists.txt:140 (configure_component) -- Sources for CGAL component library 'CGAL_Qt3/CMakeLists.txt' detected CMake Error at src/CMakeLists.txt:81 (add_subdirectory): add_subdirectory given source "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt" which is not an existing directory. Call Stack (most recent call first): src/CMakeLists.txt:140 (configure_component) -- Sources for CGAL component library 'CGAL_Qt4/CMakeLists.txt' detected CMake Error at src/CMakeLists.txt:81 (add_subdirectory): add_subdirectory given source "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt" which is not an existing directory. Call Stack (most recent call first): src/CMakeLists.txt:140 (configure_component) -- Sources for CGAL component libraries 'CGAL_Core/CMakeLists.txt;CGAL_ImageIO/CMakeLists.txt;CGAL_Qt3/CMakeLists.txt;CGAL_Qt4/CMakeLists.txt' detected == Generating build files (DONE) == -- Configuring incomplete, errors occurred! See also "/home/chengan/OpenFOAM/ThirdParty-2.4.0/build/linux64Gcc/CGAL-4.6/CMakeFiles/CMakeOutput.log". See also "/home/chengan/OpenFOAM/ThirdParty-2.4.0/build/linux64Gcc/CGAL-4.6/CMakeFiles/CMakeError.log". + exit 1
还有很多这样的:
/usr/bin/ld: /home/chengan/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: error: ld returned 1 exit status make[2]: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/Makefile:150: /home/chengan/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/interMixingFoam] Error 1 make[1]: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: interFoam] Error 2 make[1]: Target 'application' not remade because of errors. make: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: multiphase] Error 2 make: Target 'application' not remade because of errors.
log文件如下:
log.tar.xz
希望李老师能百忙之中指点一下! -
-
@李东岳 谢谢李老师,不过命令报错了
chengan@chengan-MS-7C80:~/OpenFOAM/OpenFOAM-2.4.0$ find src applications -name "*.L" -type f | xargs sed -i -e 's=(YY_FLEX_SUBMINOR_VERSION)=YY_FLEX_MINOR_VERSION < 6 && \1=' sed: -e expression #1, char 61: invalid reference \1 on `s' command's RHS
-
-
@chengan-wang 没关系,主要是其中做foamQuad网格的,这个用得少
-
@chengan-wang 为什么要用openfoam2.4.?
-
-