OpenFOAM 复制错误

OpenFOAM 复制错误

我开始尝试安装 OpenFOAM 已经一周了。我正尝试在我的笔记本上安装 OpenFOAM v1806。不幸的是,当我尝试通过键入“ source $HOME/OpenFOAM/OpenFOAM-v1806/etc/bashrc WM_LABEL_SIZE=64”来构建具有正常 64 位整数支持的 OpenFOAM 时,我遇到了一些错误

您能给我任何建议或线索来解决这个问题吗?

提前谢谢您。

错误信息如下:

-bash: eval: line 38: syntax error near unexpected token `('
-bash: eval: line 38: `PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program:Files:(x86)/Intel/iCLS:Client:Files/Intel/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:(x86)/Intel/Intel(R):Management:Engine:Components/DAL:Files/Intel/Intel(R):Components/IPT:/mnt/c/Users/Administrator/AppData/Local/Microsoft/WindowsApps:/snap/bin'
-bash: eval: line 62: syntax error near unexpected token `('
-bash: eval: line 62: `PATH=/home/jwhan/OpenFOAM/jwhan-v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/site/v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/wmake:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program:Files:(x86)/Intel/iCLS:Client:Files/Intel/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:(x86)/Intel/Intel(R):Management:Engine:Components/DAL:Files/Intel/Intel(R):Components/IPT:/mnt/c/Users/Administrator/AppData/Local/Microsoft/WindowsApps:/snap/bin:'
No completion added for /home/jwhan/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt64Opt/bin
... incorrect platform, or not yet compiled?
-bash: eval: line 38: syntax error near unexpected token `('
-bash: eval: line 38: `PATH=/home/jwhan/OpenFOAM/ThirdParty-v1806/platforms/linux64Gcc/gperftools-2.5/bin:/home/jwhan/OpenFOAM/jwhan-v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/site/v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt64Opt/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/bin:/home/jwhan/OpenFOAM/OpenFOAM-v1806/wmake:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program:Files:(x86)/Intel/iCLS:Client:Files/Intel/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:(x86)/Intel/Intel(R):Management:Engine:Components/DAL:Files/Intel/Intel(R):Components/IPT:/mnt/c/Users/Administrator/AppData/Local/Microsoft/WindowsApps:/snap/bin'

答案1

驱动器/安装座中的所有目录都/mnt/c包含括号和空格等奇怪字符,从而混淆了 OpenFOAM 构建脚本。您有几种选择:

  1. /mnt/c在构建 OpenFOAM 时卸载,构建完成后,您可以重新安装。
  2. sudo apt-get install openfoam;版本 4.1 可在 ubuntu 18.04 的存储库中使用,您无需编译它。

相关内容