Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error on Ubuntu 22.04 - Could not load the Qt platform plugin "xcb" #5974

Closed
abertagnon opened this issue May 16, 2022 · 13 comments
Closed
Labels
bug report Bug is reported by user, not yet confirmed by the core team

Comments

@abertagnon
Copy link

When I execute the command python3 -m Orange.canvas i get the following error:

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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

The problem occurs on Ubuntu 22.04 fresh installation. I installed Orange via the command pip install orange3 (pip version 22.1, python version 3.10).

@abertagnon abertagnon added the bug report Bug is reported by user, not yet confirmed by the core team label May 16, 2022
@ales-erjavec
Copy link
Contributor

Can you run

QT_DEBUG_PLUGINS=1 python3 -m Orange.canvas

and post the output.

@abertagnon
Copy link
Author

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QFactoryLoader::QFactoryLoader() checking directory path "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "webgl"
        ]
    },
    "archreq": 0,
    "className": "QWebGLIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/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 "/usr/bin/platforms" ...
Cannot load library /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted (core dumped)

@ales-erjavec
Copy link
Contributor

...
QLibraryPrivate::loadPlugin failed on "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
...

try

sudo apt-get install libxcb-xinerama0

@ales-erjavec
Copy link
Contributor

You might need to also install any of the following

libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

i.e.

sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

@abertagnon
Copy link
Author

Running
sudo apt-get install libxcb-xinerama0
and then
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa
Solved the problem.

@UPC-PaalDriveklepp
Copy link

For me, running sudo apt-get install libxcb-xinerama0 was enough

@rafaeljcg20
Copy link

Thanks

it's working too

@cloudmanbr
Copy link

cloudmanbr commented Mar 11, 2023

Works for me too! Thanks guys!

sudo apt-get install libxcb-xinerama0

@mbark125
Copy link

[G4]
[G4] **************************************************************
[G4] Geant4 version Name: geant4-11-00-patch-01 (8-March-2022)
[G4] Copyright : Geant4 Collaboration
[G4] References : NIM A 506 (2003), 250-303
[G4] : IEEE-TNS 53 (2006), 270-278
[G4] : NIM A 835 (2016), 186-225
[G4] WWW : http://geant4.org/
[G4] **************************************************************
[G4]
[Core-0] Initialization of geometry
[Core-0] Initialization of physics
[Core-0] Initialization of actors
[G4] Available UI session types: [ Qt, tcsh, csh ]
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

CAUGHT SIGNAL: 6 ### address: 0x3e8000011a7, signal = SIGABRT, value = 6, description = abort program (formerly SIGIOT).

Backtrace:
[PID=4519, TID=-2][ 0/15]> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f7db075a00b]
[PID=4519, TID=-2][ 1/15]> /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7f7db0739859]
[PID=4519, TID=-2][ 2/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x85aad) [0x7f7db5153aad]
[PID=4519, TID=-2][ 3/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate25createPlatformIntegrationEv+0x111e) [0x7f7daf9657ae]
[PID=4519, TID=-2][ 4/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate21createEventDispatcherEv+0x38) [0x7f7daf966708]
[PID=4519, TID=-2][ 5/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN23QCoreApplicationPrivate4initEv+0xae5) [0x7f7db535af55]
[PID=4519, TID=-2][ 6/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate4initEv+0x33) [0x7f7daf968543]
[PID=4519, TID=-2][ 7/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN19QApplicationPrivate4initEv+0xd) [0x7f7daffa33bd]
[PID=4519, TID=-2][ 8/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(ZN4G4QtC2EiPPcS0+0xf6) [0x7f7db5674746]
[PID=4519, TID=-2][ 9/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(ZN4G4Qt11getInstanceEiPPcS0+0x55) [0x7f7db56748b5]
[PID=4519, TID=-2][10/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(_ZN6G4UIQtC1EiPPc+0x26c) [0x7f7db565eb2c]
[PID=4519, TID=-2][11/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(_ZN13G4UIExecutiveC2EiPPcRK8G4String+0x664) [0x7f7db5641064]
[PID=4519, TID=-2][12/15]> /snap/gate/41/usr/local/bin/Gate(+0xe6dc3) [0x5606252e4dc3]
[PID=4519, TID=-2][13/15]> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f7db073b083]
[PID=4519, TID=-2][14/15]> /snap/gate/41/usr/local/bin/Gate(+0x12a58e) [0x56062532858e]

: Aborted (Signal sent by tkill() 4519 1000)
Abandon (core dumped)

@sirEgghead
Copy link

Running sudo apt-get install libxcb-xinerama0 and then sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa Solved the problem.

This worked for me, with the addition of installing libxcb-cursor.

@Qunut999
Copy link

...
QLibraryPrivate::loadPlugin failed on "/home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /home/studente/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
...

try

sudo apt-get install libxcb-xinerama0

You might need to also install any of the following

libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

i.e.

sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

You might need to also install any of the following

libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

i.e.

sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

Hello @ales-erjavec,

Thank you for your suggestions on the related issue. I'm encountering a similar problem with the Qt platform plugin "offscreen" failing to load, and the error message I receive is:

QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so: (/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so: undefined symbol: _ZNK20QPlatformIntegration28createPlatformVulkanInstanceEP15QVulkanInstance, version Qt_5_PRIVATE_API)"

This suggests an issue with the Qt platform plugin initialization. Could you please advise if there are any specific packages or steps I should consider to resolve this issue?

Thank you for your help!

@redthing1
Copy link

@Qunut999 I have the same issue:

_ZNK20QPlatformIntegration28createPlatformVulkanInstanceEP15QVulkanInstance

in particular is missing, and I don't know why. I tried building Qt from source, same issue.

@FirmoDev
Copy link

Running sudo apt-get install libxcb-xinerama0 and then sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa Solved the problem.

thank you! but why? I wanted to understand why this solved the problem..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug is reported by user, not yet confirmed by the core team
Projects
None yet
Development

No branches or pull requests

10 participants