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

1

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
Sabo answered 29/10, 2020 at 9:45 Comment(3)
@Navaro yes I amSabo
yes thank you. It worked, I just have som Qt problems to fix nowSabo
Just as a side note: It's not necessary to have Paraview installed on WSL. You can install a Windows version of Paraview instead and use it to open the case files with .foam extension.Jarita
J
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 
Jarita answered 29/10, 2020 at 15:27 Comment(5)
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 anythingSabo
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?Vicarage
@phetdam: Yes, I believe this is no longer an issue for WSL2.Jarita
@AlexV.: You can make a backup copy of libQt5Core.so.5.15.3 and run the strip command against it.Jarita
@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 solutionJarita

© 2022 - 2024 — McMap. All rights reserved.