No QT platform error - Ubuntu 22.04 LTS

Hello,

I am trying to launch paraview and I get the following error

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: exception occurred: Subprocess aborted

I am opening paraview using the " ./paraview " command. I am running Ubuntu 22.04 LTS. Please let me know how to proceed.

1 Like

Please download our binary release of ParaView: https://paraview.org/download

I also met the same problem though I downloaded the binary release of ParaView.

Which version of ParaView ?

The xcb libraries need to be provided by the system. You can see what is missing by doing ldd /paraview-install-location/plugins/platforms/libqxcb.so and then use apt to install what provides those libraries.

2 Likes

You probably need the list from Building Qt5 from git:
but without the -dev added on the end.

sudo apt-get install '^libxcb.*' libx11-xcb libglu1-mesa libxrender libxi libxkbcommon libxkbcommon-x11 
1 Like

Also, please see this FAQ entry:

1 Like

Hello all, I’m facing a similar issue as the OP. I downloaded a binary release of ParaView (5.11.2). I have installed the libraries recommended by @aron.helser and @cory.quammen. When I run with QT_DEBUG_PLUGINS=1, I get the following error:

QFactoryLoader::QFactoryLoader() checking directory path "/home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/platforms/libqxcb.so"
Found metadata in lib /home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/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 "/home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/bin/platforms" ...
Cannot load library /home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/jbrinker/software/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)"
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: exception occurred: Subprocess aborted

When I run ldd on the libqxcb.so object as suggested by @ben.boeckel, none of the libraries appear to be missing:

linux-vdso.so.1 (0x00007ffc64d96000)
	libQt5XcbQpa.so.5 => /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007f02d9810000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f02d95b6000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f02d94ee000)
	libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00007f02d94d2000)
	libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f02d8c00000)
	libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f02d8600000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f02d944b000)
	libpthread.so.0 => /usr/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f02d9809000)
	libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f02d9804000)
	libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f02d9442000)
	libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f02d943c000)
	libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f02d9437000)
	libxcb-util.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007f02d942e000)
	libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f02d9429000)
	libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f02d9416000)
	libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f02d940d000)
	libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f02d93fe000)
	libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f02d93f9000)
	libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f02d93ef000)
	libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f02d93e5000)
	libxcb-xinerama.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007f02d93e0000)
	libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f02d93c0000)
	libxcb-xinput.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinput.so.0 (0x00007f02d939c000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f02d9372000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f02d935d000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f02d84c0000)
	libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f02d9352000)
	libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f02d9333000)
	libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f02d9328000)
	libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f02d92e1000)
	libdl.so.2 => /usr/lib/x86_64-linux-gnu/libdl.so.2 (0x00007f02d8bfb000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f02d8200000)
	libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007f02d8119000)
	libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f02d8bdb000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f02d7e00000)
	libQt5DBus.so.5 => /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f02d842c000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f02d8bce000)
	libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f02d7cc6000)
	libexpat.so.1 => /usr/lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f02d8b9b000)
	libuuid.so.1 => /usr/lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f02d8b92000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f02d80de000)
	libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f02d8b84000)
	libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f02d7bf7000)
	libmd4c.so.0 => /usr/lib/x86_64-linux-gnu/libmd4c.so.0 (0x00007f02d8b72000)
	libdouble-conversion.so.3 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007f02d80c9000)
	libicui18n.so.70 => /usr/lib/x86_64-linux-gnu/libicui18n.so.70 (0x00007f02d7800000)
	libicuuc.so.70 => /usr/lib/x86_64-linux-gnu/libicuuc.so.70 (0x00007f02d7605000)
	libpcre2-16.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f02d803f000)
	libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f02d7536000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f02d998d000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f02d7b3f000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f02d7502000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f02d8b68000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f02d8b60000)
	libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f02d74ea000)
	libdbus-1.so.3 => /usr/lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f02d749c000)
	libpcre.so.3 => /usr/lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f02d7426000)
	libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f02d7403000)
	libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f02d73dc000)
	libicudata.so.70 => /usr/lib/x86_64-linux-gnu/libicudata.so.70 (0x00007f02d5600000)
	libmd.so.0 => /usr/lib/x86_64-linux-gnu/libmd.so.0 (0x00007f02d802e000)
	libsystemd.so.0 => /usr/lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f02d7315000)
	liblzma.so.5 => /usr/lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f02d72ea000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f02d72ca000)
	libcap.so.2 => /usr/lib/x86_64-linux-gnu/libcap.so.2 (0x00007f02d7b34000)
	libgcrypt.so.20 => /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f02d54c2000)
	libgpg-error.so.0 => /usr/lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f02d72a4000)

I’m now stuck. Any suggestions for next steps?

This is odd. Why is it picking up a system Qt library like this? Is there a copy of this in ParaView’s package somewhere?

Hi @ben.boeckel, thanks for responding. Your response made me check my LD_LIBRARY_PATH environment variable. I see that I had added /usr/lib/x86_64-linux-gnu to LD_LIBRARY_PATH (for my case, to ensure FFTW libraries are accessible). When I changed my LD_LIBRARY_PATH to include path-to-paraview/lib before referencing any of the system lib folders, ParaView launches just fine.

Thanks for the help!

2 Likes

ParaView packages shouldn’t need LD_LIBRARY_PATH at all as they should have RPATH set up properly package-wide. If it’s a custom build, rpath management would then be up to you.

For Rocky Linux 8 (and probably all other RHEL 8 based/derived/whatever distros), you have to install the following packages for paraview 5.12.1:
libxcb, xcb-util-wm, xcb-util-image, xcb-util-keysyms, xcb-util-renderutil