CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Installation of OpenFOAM 7 on WSL

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By PositronCascade

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2020, 05:53
Default Installation of OpenFOAM 7 on WSL
  #1
New Member
 
Martin
Join Date: Oct 2013
Location: Newcastle
Posts: 21
Rep Power: 12
mahtin360 is on a distinguished road
Hi,

just been trying to install OpenFOAM 7 on WSL. I cant get past the first step
Code:
sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
and get this error:
--2020-05-12 10:43:59-- http://dl.openfoam.org/gpg.key
Resolving dl.openfoam.org (dl.openfoam.org)... 35.179.33.128
Connecting to dl.openfoam.org (dl.openfoam.org)|35.179.33.128|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1710 (1.7K) [application/pgp-keys]
Saving to: ‘STDOUT’

- 100%[=================================================>] 1.67K --.-KB/s in 0s

2020-05-12 10:43:59 (141 MB/s) - written to stdout [1710/1710]

gpg: can't connect to the agent: IPC connect call failed

EDIT:

Realized the Ubuntu version in Windows Store installed 20.4 LTS instead of 18.04 LTS . With 18.04 LTS this issue does not exist!

Regards,
Martin

Last edited by mahtin360; May 12, 2020 at 06:13. Reason: Found Solution
mahtin360 is offline   Reply With Quote

Old   May 14, 2020, 05:32
Default
  #2
Member
 
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 9
PositronCascade is on a distinguished road
Hello,

I think it is a bug of Windows Subsystem Linux for Ubuntu 20.04. I hope Microsoft will fix it soon. Till that time, I followed the issue reported here. It downgrades libc6. Otherwise, you may continue to use Ubuntu 18.04. I think the issue might be fixed with WSL 2.

First, I used these commands:

Code:
sudo add-apt-repository ppa:rafaeldtinoco/lp1871129
sudo apt update
sudo apt install libc6=2.31-0ubuntu8+lp1871129~1 libc6-dev=2.31-0ubuntu8+lp1871129~1 libc-dev-bin=2.31-0ubuntu8+lp1871129~1 -y --allow-downgrades
sudo apt-mark hold libc6
Then, I installed OpenFOAM v7 as guided on cfd.direct website:

Code:
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam7
I hope it works for you as well.


EDIT: as an update, this issue is fixed in Windows 10 2004.
Annier likes this.

Last edited by PositronCascade; June 3, 2020 at 10:29.
PositronCascade is offline   Reply With Quote

Old   June 7, 2020, 12:25
Default
  #3
New Member
 
Join Date: Jun 2020
Posts: 2
Rep Power: 0
Max_CFD is on a distinguished road
Hi,

I had the same issue of Martin (I have to install OpenFoam 7 on Windows 10 using Ubuntu 20.04) and I have followed your method.

I get past the "sudo sh..." step but now I have some issues with the . $HOME/.bashrc step (https://openfoam.org/download/windows-10/, User Configuration, setp 2). I get this error:

-bash: /opt/openfoam7/etc/bashrc: No such file or directory

Did you have the same problem?

Regards,
Massimo
Max_CFD is offline   Reply With Quote

Old   June 7, 2020, 20:11
Default
  #4
Member
 
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 9
PositronCascade is on a distinguished road
Quote:
Originally Posted by Max_CFD View Post
Hi,

I had the same issue of Martin (I have to install OpenFoam 7 on Windows 10 using Ubuntu 20.04) and I have followed your method.

I get past the "sudo sh..." step but now I have some issues with the . $HOME/.bashrc step (https://openfoam.org/download/windows-10/, User Configuration, setp 2). I get this error:

-bash: /opt/openfoam7/etc/bashrc: No such file or directory

Did you have the same problem?

Regards,
Massimo
If you installed OpenFOAM on that path, you need to use source command maybe, so try that way to check if it works:

source /opt/openfoam7/etc/bashrc when you start your terminal. Or by gedit/vim you can add those lines to the bottom of your .bashrc file. Or if you used developer version of it, you need source /opt/openfoam7-dev/etc/bashrc
PositronCascade is offline   Reply With Quote

Old   June 8, 2020, 02:47
Default
  #5
New Member
 
Join Date: Jun 2020
Posts: 2
Rep Power: 0
Max_CFD is on a distinguished road
I have just tried both commands but I recive the same message "No such file or directory".

I am going to unistall Ubuntu 20.04 ant try with Ubuntu 18.04 and see if I can solve the problem starting with a fresh new installation of OpenFoam7.

Thank you, best,
Massimo
Max_CFD is offline   Reply With Quote

Old   February 2, 2021, 18:35
Default
  #6
Member
 
Anil Kunwar
Join Date: Jun 2013
Posts: 64
Rep Power: 11
Annier is an unknown quantity at this point
Quote:
Originally Posted by PositronCascade View Post
Hello,

I think it is a bug of Windows Subsystem Linux for Ubuntu 20.04. I hope Microsoft will fix it soon. Till that time, I followed the issue reported here. It downgrades libc6. Otherwise, you may continue to use Ubuntu 18.04. I think the issue might be fixed with WSL 2.

First, I used these commands:

Code:
sudo add-apt-repository ppa:rafaeldtinoco/lp1871129
sudo apt update
sudo apt install libc6=2.31-0ubuntu8+lp1871129~1 libc6-dev=2.31-0ubuntu8+lp1871129~1 libc-dev-bin=2.31-0ubuntu8+lp1871129~1 -y --allow-downgrades
sudo apt-mark hold libc6
Then, I installed OpenFOAM v7 as guided on cfd.direct website:

Code:
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam7
I hope it works for you as well.


EDIT: as an update, this issue is fixed in Windows 10 2004.

I could successfully install openfoam7 in my computer.
Annier is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
[OpenFOAM.org] Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9 opedrofunk OpenFOAM Installation 7 July 1, 2015 13:51
[Discussion] Restructuring the Installation page at openfoamwiki.net wyldckat OpenFOAM Installation 16 November 2, 2013 11:43
Trouble shooting about OpenFOAM installation in Ubuntu 12.04 Nait OpenFOAM Installation 2 December 12, 2012 10:20
Installation of OpenFOAM 1.7.1 to OprnSUSE 11.2 superfxfund OpenFOAM Installation 3 November 11, 2010 02:15


All times are GMT -4. The time now is 11:43.