Install fail Slicer-5.0.3 on Ubuntu-22.04.1

Hi & greetings. I have the following problem:
when I try to start my new 3D Slicer on Linux there is a flash of the “welcome screen” & the following error message:

Qt: Session management error: Could not open network socket
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I found some fixes here used for other versions:

Debian / Ubuntu
The following may be needed on fresh debian or ubuntu:

sudo apt-get install libpulse-dev libnss3 libglu1-mesa
sudo apt-get install --reinstall libxcb-xinerama0
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

The solution is to create symlink:

sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

Did not work, same error…
???
Greetings jsteinj

I am having the exact same issue trying to install Slicer 5.0.3 on Fedora 36… Did you happen to find a solution?

Cheers

@cnot Please follow these instructions and let us know if it fixed the problem.

@JSteinJ Slicer uses Qt as GUI toolkit and right now many (all?) such applications seem to be broken if Wayland is used (see for example 1 and 2). Please try solutions that you can find on the web about running Qt applications on Ubuntu-22 with Wayland and let us know if you found any solution (or if disabling Wayland fixes the issue).

@lassoan Those are the instructions I followed originally, see Problems with 3D Slicer 5.0.3 Installation on Fedora 36 for the full results. Unfortunately, it is still not running…

@cnot thank you for trying those instructions
If those did not help then probably your system is configured to use Wayland. Please see tips that I gave to @JSteinJ above.

Hi @lassoan , it actually does not appear as if my system is configured to use Wayland. The output of

echo $XDG_SESSION_TYPE

is

x11

…Is there another possible explanation?

Try the QT_DEBUG_PLUGIN=1 as explained in here Can't start latest stable on ubuntu 20.04 - #2 by muratmaga

and see which other QT plugin you are missing from your system (the ones we included in the documentation are the most common ones for most common install options, they are not necessarily the only ones, say if you did a minimal install).

Thank you very much for your reply, @muratmaga . When running it with QT_DEBUG_PLUGIN, this is the output:

Found metadata in lib /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“xcb”
]
},
“archreq”: 0,
“className”: “QXcbIntegrationPlugin”,
“debug”: false,
“version”: 331520
}

Got keys from plugin meta data (“xcb”)
QFactoryLoader::QFactoryLoader() checking directory path “/usr/img/Slicer503/bin/platforms” …
Cannot load library /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on “/usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so” : “Cannot load library /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)”
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

error: [/usr/img/Slicer503/bin/SlicerApp-real] exit abnormally - Report the problem.

I tried:
dnf install libxcb-icccm.so.4

Result:

No match for argument: lixcb-icccm.so.4
Error: Unable to find a match: lixcb-icccm.so.4

I then tried
dnf list libxcb

To see if I was missing anything, but the result was

Installed Packages
libxcb.i686 1.13.1-9.fc36 @fedora
libxcb.x86_64 1.13.1-9.fc36 @fedora

So I am now not sure how to proceed!

did you try the wm-util package? I am not a fedora user, but it seems to provide
https://rpmfind.net/linux/RPM/fedora/devel/rawhide/aarch64/x/xcb-util-wm-0.4.1-23.fc37.aarch64.html

Thank you for your suggestion! Yes, I already have xcb-util-wm-0.4.1-12.el8.x86_64.rpm installed…

Then somehow QT is not finding the that. Perhaps you are simply missing the symbolic link. For example on my ubuntu it shows like this:

/usr/lib/x86_64-linux-gnu$ ls -l libxcb-ic*
lrwxrwxrwx 1 root root    21 Nov  4  2021 libxcb-icccm.so.4 -> libxcb-icccm.so.4.0.0
-rw-r--r-- 1 root root 22464 Dec  4  2018 libxcb-icccm.so.4.0.0

or it is not on a path that QT looks… Sorry that’s as far as I can help…

1 Like