Problem running Slicer on CentOS8

I was having the same problems opening Slicer 4.11 with CentOS8. I have followed the methods mentioned above and made sure that all the missing libraries have been installed, but I still keep having the following errors:

[hermioned@localhost Slicer-4.11.20200930-linux-amd64]$ ldd /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so | grep "not found"
/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5Gui.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

I installed and updated libqxcb.so using updatedb && locate libQt5XcbQpa.so.5 and then and "strings -d /usr/lib64/libQt5XcbQpa.so.5 | grep Qt.*API", I get the result "Qt_5.12.5_PRIVATE_API"
I see the problem here is: Slicer is looking for Qt_5_PRIVATE_API but I have “Qt_5.12.5_PRIVATE_API”, they just have different names/versions.
Is there a way that I could tell Slicer to look for “Qt_5.12.5_PRIVATE_API”?

Slicer package includes Qt (Slicer-4.11.20200930 uses Qt-5.15.1). When you run the application using the “launcher” (./Slicer), the launcher sets up LD library paths so that Qt bundled with Slicer is found. If you simply run ldd (not via the launcher) then you will get false alarms, as the correct paths are not set up.

What happens if you run Slicer using the launcher (./Slicer)?

Now it works! Thanks so much!

1 Like

Sorry, what was the solution?
Or rather what was the original problem that ./Slicer didn’t work?

After I installed all the missing libraries, using:

[hermioned@localhost Slicer-4.11.20200930-linux-amd64]$ ldd /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so | grep "not found"
    	libQt5XcbQpa.so.5 => not found
    	libQt5Gui.so.5 => not found
    	libQt5DBus.so.5 => not found
    	libQt5Core.so.5 => not found
    	libxcb-render-util.so.0 => not found

Even though I still have the error message shown below, I am able to use ./Slicer to open Slicer now

[hermioned@localhost Slicer-4.11.20200930-linux-amd64]$ ldd /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so | grep “not found”

/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API’ not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5Gui.so.5: version `Qt_5_PRIVATE_API’ not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

/home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so: /lib64/libQt5Core.so.5: version `Qt_5.15’ not found (required by /home/hermioned/Slicer-4.11.20200930-linux-amd64/lib/QtPlugins/platforms/libqxcb.so)

When you run ldd outside Slicer’s virtual environment (set up by the ./Slicer launcher) then the “errors” that you listed are expected to appear, that’s the correct behavior. You will not see the errors if you execute ldd with the launcher (./Slicer).