5

I installed OpenFOAM on Ubuntu (which is itself on WSL Windows Subsystem for Linux). I have a problem when trying to launch paraFoam and I have this error :

Invalid $PV_PLUGIN_PATH and -plugin-path= not defined
No supplementary ParaView/OpenFOAM reader modules
Using builtin reader: paraFoam -vtk

paraview: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

It seems that it comes from paraview or Qt but I don't know what to do. The file libQt5Core.so.5 does exist in the computer

When I type qmake --version I have

QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu
Mort
  • 3,379
  • 1
  • 25
  • 40
Taendyr
  • 89
  • 1
  • 1
  • 9

1 Answers1

12

Since you are using WSL1, this issue is common. you can solve it by running the following command:

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

To solve the issue related to the GLIBCXX, try:

sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/OpenFOAM/ThirdParty-v2006/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6 
s.ouchene
  • 1,682
  • 13
  • 31
  • 1
    I have now others errors which say ```/opt/OpenFOAM/ThirdParty-v2006/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26'``` I tried to do ```sudo apt-get update``` and ```sudo apt-get upgrade``` but it doesn't change anything – Taendyr Nov 02 '20 at 14:50
  • This seems to be relevant for Qt6 as well on WSL 1--I was pulling my hair out trying to figure out why `qmake` and friends could not find `libQt6Core.so.6` despite it obviously existing in my `/path/to/Qt6/lib` directory. Is this no longer an issue for WSL 2? – phetdam Feb 27 '22 at 08:53
  • 1
    @phetdam: Yes, I believe this is no longer an issue for WSL2. – s.ouchene Feb 27 '22 at 21:44
  • @AlexV.: You can make a backup copy of libQt5Core.so.5.15.3 and run the strip command against it. – s.ouchene Apr 25 '23 at 13:01
  • @AlexV. I believe the comment section might not be the best place to resolve this issue. Please consider asking a new question for a more effective solution – s.ouchene Apr 25 '23 at 13:21