|
[Sponsors] |
[OpenFOAM.com] Setting of working environment in Ubuntu / WSL |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 4, 2019, 15:24 |
Setting of working environment in Ubuntu / WSL
|
#1 |
New Member
Join Date: Jan 2019
Posts: 2
Rep Power: 0 |
Dear all,
I've installed OpenFoam v18.06 under Ubuntu 18.04 (Linux-Subsystem for Win10). I tried to set the working environment by Code:
echo "source /opt/OpenFOAM/OpenFOAM-v1806/etc/bashrc" >> ~/.bashrc source $HOME/.bashrc Code:
-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/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc:Files:(x86)/Common:Files/Oracle/Java/javapath_target_230390484:(x86)/Business:Objects/Common/3.5/bin/NOTES:(x86)/NVIDIA:Corporation/PhysX/Common:/mnt/c/ProgramData/Oracle/Java/javapath:Files/Common:Files/microsoft:shared/Windows:Live:(x86)/Silverfrost/FTN95:Express:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/dislin/win:(x86)/MiKTeX:2.9/miktex/bin:(x86)/Windows:Live/Shared:(x86)/Calibre2:(x86)/GNU/GnuPG/pub:/mnt/c/Windows/System32/OpenSSH:Files/ngsolve-v6.2.1805/bin:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36/Scripts:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36:/mnt/c/Users/Christoph/AppData/Local/Microsoft/WindowsApps:/snap/bin' -bash: eval: line 62: syntax error near unexpected token `(' -bash: eval: line 62: `PATH=/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64Gcc63/openmpi-1.10.4/bin:/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/bin:/home/christoph/OpenFOAM/christoph-v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/site/v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/OpenFOAM-v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/OpenFOAM-v1806/bin:/opt/OpenFOAM/OpenFOAM-v1806/wmake:/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64Gcc63/gperftools-2.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program:Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc:Files:(x86)/Common:Files/Oracle/Java/javapath_target_230390484:(x86)/Business:Objects/Common/3.5/bin/NOTES:(x86)/NVIDIA:Corporation/PhysX/Common:/mnt/c/ProgramData/Oracle/Java/javapath:Files/Common:Files/microsoft:shared/Windows:Live:(x86)/Silverfrost/FTN95:Express:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/dislin/win:(x86)/MiKTeX:2.9/miktex/bin:(x86)/Windows:Live/Shared:(x86)/Calibre2:(x86)/GNU/GnuPG/pub:/mnt/c/Windows/System32/OpenSSH:Files/ngsolve-v6.2.1805/bin:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36/Scripts:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36:/mnt/c/Users/Christoph/AppData/Local/Microsoft/WindowsApps:/snap/bin:' -bash: eval: line 38: syntax error near unexpected token `(' -bash: eval: line 38: `PATH=/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64Gcc63/gperftools-2.5/bin:/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64Gcc63/openmpi-1.10.4/bin:/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/bin:/home/christoph/OpenFOAM/christoph-v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/site/v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/OpenFOAM-v1806/platforms/linux64Gcc63DPInt32Opt/bin:/opt/OpenFOAM/OpenFOAM-v1806/bin:/opt/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/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc:Files:(x86)/Common:Files/Oracle/Java/javapath_target_230390484:(x86)/Business:Objects/Common/3.5/bin/NOTES:(x86)/NVIDIA:Corporation/PhysX/Common:/mnt/c/ProgramData/Oracle/Java/javapath:Files/Common:Files/microsoft:shared/Windows:Live:(x86)/Silverfrost/FTN95:Express:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/dislin/win:(x86)/MiKTeX:2.9/miktex/bin:(x86)/Windows:Live/Shared:(x86)/Calibre2:(x86)/GNU/GnuPG/pub:/mnt/c/Windows/System32/OpenSSH:Files/ngsolve-v6.2.1805/bin:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36/Scripts:/mnt/c/Users/Christoph/AppData/Local/Programs/Python/Python36:/mnt/c/Users/Christoph/AppData/Local/Microsoft/WindowsApps:/snap/bin' But nevertheless I would like to understand and solve this problem. So any hints are welcome. Thanks and best regards Christoph |
|
January 4, 2019, 20:12 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
__________________
|
|
January 5, 2019, 06:01 |
|
#3 |
New Member
Join Date: Jan 2019
Posts: 2
Rep Power: 0 |
Thanks for your quick response.
It works with upgrade to v18.12. Best regards Christoph |
|
March 16, 2024, 16:28 |
Backing up other paths
|
#4 | |
New Member
|
Quote:
Code:
# For OpenFOAM # workaround of alien paths issues from windows in WSL # store temporary path export tmp_PATH=$(echo $PATH | sed 's|^/usr/local/bin:||;s|:/usr/local/bin:|:|g') export tmp_PATH=$(echo $tmp_PATH | sed 's|^/usr/bin:||;s|:/usr/bin:|:|g') export tmp_PATH=$(echo $tmp_PATH | sed 's|^/bin:||;s|:/bin:|:|g') export tmp_PATH=$(echo $tmp_PATH | sed 's|^/usr/sbin:||;s|:/usr/sbin:|:|g') export tmp_PATH=$(echo $tmp_PATH | sed 's|^/sbin:||;s|:/sbin:|:|g') # reset PATH to basic Linux export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin # source OpenFOAM environment source /opt/openfoam11/etc/bashrc # add paths from tmp_PATH export PATH="$PATH:$tmp_PATH" |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting working environment variable | Arthur | FLUENT | 0 | December 10, 2008 05:33 |
ICEM working directory setting | Bogesz | CFX | 2 | October 8, 2008 08:45 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |
setting the working directory | Jiri Novak | FLUENT | 4 | April 24, 2005 09:13 |
Debate on Working Environment | Debate | Main CFD Forum | 11 | December 20, 2000 00:21 |