Search code examples
paraviewopenfoam

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


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

Solution

  • 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