View Issue Details

IDProjectCategoryView StatusLast Update
0003736OpenFOAMBugpublic2021-10-19 11:04
Reporterfelipe Assigned Tochris  
Status resolvedResolutionfixed 
PlatformUBUNTU 20.04OSWindowsOS Version10
Product Version9 
Summary0003736: Issue launching paraFoam
DescriptionparaFoam doesn't lauch anything and I get the following message:

felipe@VSAV418PROY:~/OpenFOAM/felipe-9/run/cavity$ paraFoam &
[2] 288
felipe@VSAV418PROY:~/OpenFOAM/felipe-9/run/cavity$ Created temporary 'cavity.OpenFOAM'
/opt/paraviewopenfoam56/lib/paraview: error while loading shared libraries: cannot open shared object file: No such file or directory
Steps To ReproduceI've just installed OpenFOAM following the instructions from this page:
Then, as I was following the instructions from the tutorial on this page: , on step 2.1.2, the bug occurred after writing " paraFoam & "
Additional InformationI'm a complete newb on Ubuntu and OpenFOAM, perhaps I've made an obvious mistake...
TagsNo tags attached.



2021-10-06 16:08

updater   ~0012214

OK, this one was not a easy fix and what I'm going to describe now is just working around the real issue: it seems to be WSL's v1 fault and has been for over 2 years, the odd thing is that it only revealed itself more recently in Ubuntu, apparently due to the linker libraries...

Sources for this fix:

The workaround is as follows:

1. Install VcXsrv, instead of Xming. It's a lot more recent and it has a lot more options:

    - I used the installer "vcxsrv-"

2. Then start 'XLaunch' that was installed with VcXsrv and configure the "Extra settings" window as explained here: - namely:
   a. Unselect the Native opengl
   b. Select the "Disable access control" option.

3. Now comes a somewhat annoying workaround, which may limit Qt5's usability in your WSL-Ubuntu installation, which is to run the following command:

    sudo strip --remove-section=.note.ABI-tag /usr/./lib/x86_64-linux-gnu/

    - This will remove the bit that breaks WSL's mask in pretending to be a valid Linux Kernel, but may make a few other applications get confused with the missing note/tag.

    - You can reinstall this library by running:
         sudo apt install --reinstall libqt5core5a

4. The rest is as per instructions given here: - with the exception of replacing Xming with VcXsrv.


2021-10-06 16:15

updater   ~0012215

A somewhat better workaround without damaging Qt5's default installation on Ubuntu, is to run the following commands:

   sudo cp /usr/lib/x86_64-linux-gnu/ /opt/paraviewopenfoam56/mesa/lib/
   sudo strip --remove-section=.note.ABI-tag /opt/paraviewopenfoam56/mesa/lib/


2021-10-06 16:16

updater   ~0012216

@Chris With these findings, the changes I propose for this page: - are as follows:

1. Replace Xming with VcXsrv, since it's a lot more recent and it has a lot more options:
2. Have the users run the following workaround or provide the Qt5 library already modified in the Deb package with these commands?

   sudo cp /usr/lib/x86_64-linux-gnu/ /opt/paraviewopenfoam56/mesa/lib/
   sudo strip --remove-section=.note.ABI-tag /opt/paraviewopenfoam56/mesa/lib/


2021-10-07 17:10

reporter   ~0012217

Thanks a lot!

FYI, the first suggestion didn't work out, but I reinstalled libqt5core5a as you instructed, then tried the second workaround and this time it worked great.


2021-10-07 19:46

manager   ~0012218

@wyldckat @felipe Thanks for working through this issue.

Just confirming the suggestion to change the windows installation page at:

1) Use VcXsrv instead of Xming, configure settings as described above

2) IF you get the error message:
/opt/paraviewopenfoam56/lib/paraview: error while loading shared libraries: cannot open shared object file: No such file or directory

then run
sudo cp /usr/lib/x86_64-linux-gnu/ /opt/paraviewopenfoam56/mesa/lib/
sudo strip --remove-section=.note.ABI-tag /opt/paraviewopenfoam56/mesa/lib/


2021-10-07 22:37

manager   ~0012219

@wyldckat Let me know if the note above is what you suggest here


2021-10-08 10:58

updater   ~0012220

@Chris: Yes, that's exactly it!

I've only confirmed this for Ubuntu 20.04, I have no idea if this is still an issue on Ubuntu versions 20.10 and 21.04/10.

An additional quick suggestion/note as well: is it possible to have an automatic link that links people to the latest OpenFOAM version? It would be useful for this Windows page, given that it's rarely updated (given it was still at OpenFOAM 8 the other day).


2021-10-08 12:00

manager   ~0012221


We have always had this link:

But here, I suspect you mean a link to the latest version packed for Ubuntu. Is that correct?


2021-10-08 12:12

updater   ~0012222

@Chris: Yes, I'm referring to the Ubuntu package, if possible.
If not, having a link to the latest one would already be a nice feature.

The other alternative would be to have a dummy deb package that always points to the latest stable package... and mention that on the Windows page.


2021-10-08 13:40

manager   ~0012223

OK, added this temporary redirect (so it can be modified)

Before I change the Windows install page, I need to check:
+ In Enabling Graphical Applications, does the user still need to do set the DISPLAY environment variable?
+ I assume the changes are for Ubuntu 20.04? (We should not maintain instructions for different versions of Ubuntu)


2021-10-08 15:34

updater   ~0012224


> + In Enabling Graphical Applications, does the user still need to do set the DISPLAY environment variable?

Yes, it's still necessary.

> + I assume the changes are for Ubuntu 20.04? (We should not maintain instructions for different versions of Ubuntu)

This is something that occurs due to WSL v1, namely the subsystem that pretends that it's a Linux Kernel, so it has been affecting several Linux Distributions since 2019.
Ubuntu 22.04 is the next major version that will possibly be supported on WSL v1...

As for WSL v2, it still needs VcXsrv and the settings aforementioned, but it's a whole other ball game when in comes to installation and setting up... I'll open another report regarding WSL v2.


2021-10-11 09:37

manager   ~0012227

@wyldckat I am trying to update the instructions on installing on Windows.
I don't have access to Windows so am operating blind. So I need to run some questions by you.

The first big issue is the version of WSL. The instructions direct the reader to

As usual, the MS documentation is unclear, confusing, incomplete, circularly referencing, etc. Basically garbage.

Under the WSL install command it says: "This command will enable the required optional components, download the latest Linux kernel, set WSL 2 as your default, and install a Linux distribution for you (Ubuntu by default, see below to change this)."

This seems to indicate that the user will get WSL v2. You seem to indicate they need to use WSL v1.

What do we say here in our instructions?

When they install WSL v1, is Ubuntu 20.04 the default? (MS docs say nothing about version of Ubuntu).


2021-10-11 09:53

manager   ~0012228

@wyldckat I have made edits you mentioned:

I think we just need to clarify the WSL installation


2021-10-12 17:50

updater   ~0012233

Quick side note: "pavaview" typo in the "Problem running ParaView" section, namely it's "para" and not "pava" ;)

I might as well write the WSL v2 report here, instead of opening a new one.

WSL acts as if it was a form of virtualization software:
- v1 would pretend that it was a Linux kernel, so it was similar to using chroot on Linux, while using its own virtual filesystem.
- v2 uses VM technology to instead use a real Linux Kernel, hence minimizing compatibility issues to a minimum.

This means that both versions don't care if the end-user wants Ubuntu, Fedora, OpenSUSE or any other Linux distribution.

Now, the annoying part is that WSL v2 also has it's flaws, namely that it's not as straight forward as v1 was. Which leads us to two user scenarios:

A- In a clean Windows install, namely the user is installing WSL for the first time, it should work as described in the official documentation. Therefore:

  1. VcXsrv is needed as described.

  2. The hack for "" associated to WSL v1 is no longer needed.

  3. The following line:

      echo "export DISPLAY=:0" >> ${HOME}/.bashrc

    now becomes:

      echo 'export DISPLAY=$(awk \'/nameserver / {print $2; exit}\' /etc/resolv.conf 2>/dev/null):0' >> ${HOME}/.bashrc

    Why? It's now a legitimate VM, therefore it needs its own virtual network connection.

    - An alternative to get the up-to-date guest IP address is to use instead this command, in case "resolv.conf" was somehow disabled:

      echo 'export DISPLAY=$(ip route | awk \'/^default/{print $3; exit}\'):0' >> ${HOME}/.bashrc

So, if it's a clean install, following the official instructions should work.

Source on the ways to set "DISPLAY":

The scenario B will be in my next comment.


2021-10-12 18:02

updater   ~0012234

Scenario B - If the user already has WSL v1 installed, things get a little bit trickier...
Nonetheless, here are the steps I had to do in order to upgrade Ubuntu 20.04 installation from WSL v1 to v2:

1. Follow the official instructions for upgrading from v1 to v2:

2. After rebooting the Windows machine, upgrade the Ubuntu installation with the following commands from a command line:

    wsl -l -v
    wsl --set-version Ubuntu-20.04 2

  where "Ubuntu-20.04" is the name of the distribution installed... the user might have more than one Ubuntu version installed or simply have the one named "Ubuntu" from the MS Store, which provides the latest Ubuntu LTS version (20.04 at the moment).

3. Regarding firewall, to allow the VM to communicate the X protocol via virtual network, is a pain to explain it right now... there are already a few instructions online, such as the following:


2021-10-18 14:23

manager   ~0012239

@wyldckat Apologies for the delay on this.

I have updated the page:

Let me know if you think this is OK assuming we ignore:
+ disabling of resolv.conf
+ scenario B: upgrade from WSL v1 to WSL v2 (scenario B)


2021-10-18 15:00

updater   ~0012240

@Chris No problem for the delay... at least I don't think so...

The page now looks perfectly fine, it covers the majority of the issues.
Anything beyond this is up to the end user to sort out on their own... and/or pointing them to this report will also help them sorting it out on their own.


2021-10-19 10:59

manager   ~0012242

@wyldckat Thanks for your response and your hard work on this.
I think we are OK to close the thread.


2021-10-19 11:04

manager   ~0012243

Windows installation page updated, based on discussion:

There may be 1-2 minor additions which can be dealt with when needed.

At the end of the day, Microsoft are a $1 trillion company so they should be funding the support of OpenFOAM on their OS:

Issue History

Date Modified Username Field Change
2021-10-05 21:00 felipe New Issue
2021-10-06 16:08 wyldckat Note Added: 0012214
2021-10-06 16:15 wyldckat Note Added: 0012215
2021-10-06 16:16 wyldckat Note Added: 0012216
2021-10-06 16:16 wyldckat Assigned To => chris
2021-10-06 16:16 wyldckat Status new => assigned
2021-10-07 17:10 felipe Note Added: 0012217
2021-10-07 19:46 chris Note Added: 0012218
2021-10-07 22:37 chris Note Added: 0012219
2021-10-08 10:58 wyldckat Note Added: 0012220
2021-10-08 12:00 chris Note Added: 0012221
2021-10-08 12:12 wyldckat Note Added: 0012222
2021-10-08 13:40 chris Note Added: 0012223
2021-10-08 15:34 wyldckat Note Added: 0012224
2021-10-11 09:37 chris Note Added: 0012227
2021-10-11 09:53 chris Note Added: 0012228
2021-10-12 17:50 wyldckat Note Added: 0012233
2021-10-12 18:02 wyldckat Note Added: 0012234
2021-10-18 14:23 chris Note Added: 0012239
2021-10-18 15:00 wyldckat Note Added: 0012240
2021-10-19 10:59 chris Note Added: 0012242
2021-10-19 11:04 chris Status assigned => resolved
2021-10-19 11:04 chris Resolution open => fixed
2021-10-19 11:04 chris Note Added: 0012243