我已经从 here 下载并安装了 Windows native 编译的 OpenFOAM 。但是,当我尝试在 MSYS2 终端中运行任何 OF 命令(例如,blockMesh
、foamDictionary
...)时,我收到消息:
path/to/folder/v2106/msys64/home/ofuser/OpenFOAM/OpenFOAM-v2106/platforms/win64MingwDPInt32Opt/bin/blockMesh.exe: error while loading shared libraries: libstdc++-6.dll: cannot open shared object file: No such file or directory
在 cmd 终端中,我收到错误消息:
System Error
The code execution cannot proceed because msmpi.dll was not found. Reinstalling the program may fix this problem.
来自here ,我发现我可能需要在管理模式下重新安装 OpenFOAM,而我的工作机器上没有该模式。所以我尝试使用 pacman -S msmpi
安装 MSMPI,就像我以前那样 here 。但我收到错误消息:
error: target not found: msmpi
我的目标是在没有管理员权限的 Windows 计算机上安装和使用 OpenFOAM 软件,无论哪个版本。如果您能帮助我了解如何解决上述问题或找到其他解决方法,我将不胜感激。
P.S.1.搜索安装目录,发现libstdc++-6.dll
文件位于path\to\folder\v2106\msys64中\home\ofuser\OpenFOAM\OpenFOAM-v2106\platforms\win64MingwDPInt32Opt\bin
。所以我想知道我收到了第一条错误消息。也许OF未编译properly反对图书馆?我应该尝试按照建议删除 path\to\folder\v2106\msys64\usr\lib\gcc\x86_64-pc-msys\7.4.0\libstdc++.dll.a
here ?
P.S.2.我写过this post很久以前就了解了在 Windows 上安装 OpenFOAM 的不同方法。遗憾的是,要让它启动并运行仍然需要付出很大的努力。
P.S.3. 此问题的后续行动 here on the MSYS2 Discord server .
P.S.4.打开了一个新问题 here on the OpenFOAM repository .
最佳答案
使用 OpenFOAM-v2112,现在无需 Windows 管理员权限即可安装。 对于较旧的 OpenFOAM 版本,最初的问题仍然很明显,因为它们依赖于单独安装 msmpi。
关于windows - 在非管理员 Windows 上运行 OpenFOAM native 编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70256103/