7

First of all I would like to say that I'm not an experienced Linux user, so please, don't be too 'techy' with me.
I'm trying to install XnViewMP package on Xubuntu 20.04, but I'm getting this 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: linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)

I was googling and searching for a solution, but didn't find one. The only thing I understood is that I have some missing libraries the application relies upon? I already tried this solution, sudo apt-get install libx11-xcb1 and few other solutions I found on various websites, but I still have the same problem.

2
  • How are you trying to install the XnViewMP package? Sep 2, 2020 at 6:36
  • I downloaded '.deb' package file and installed it with sudo apt install. After several unsuccessful attempts to install required packages I tried to uninstall all the packages I installed with 'apt remove --purge' and accidentally uninstalled critical packages, lol. I'm now reinstallng Xubuntu on my machine.
    – blablaalb
    Sep 2, 2020 at 7:26

2 Answers 2

10

I was able to resolve the issue by installing missing packages. Those are the steps I performed:

  1. I set the QT_DEBUG_PLUGINS to 1 with export QT_DEBUG_PLUGINS=1 command and ran xnview from the same command line. It returned the following output:
QFactoryLoader::QFactoryLoader() checking directory path "/opt/XnView/lib/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/opt/XnView/lib/platforms/libqlinuxfb.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqminimal.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqminimalegl.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqoffscreen.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqvnc.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqwayland-egl.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqwayland-generic.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqwebgl.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/lib/platforms/libqxcb.so"
Found metadata in lib /opt/XnView/lib/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 "/opt/XnView/platforms" ...
Cannot load library /opt/XnView/lib/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/opt/XnView/lib/platforms/libqxcb.so" : "Cannot load library /opt/XnView/lib/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: linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)
  1. I checked for missing packages with ldd /opt/XnView/lib/platforms/libqxcb.so | grep "not found"
ldd /opt/XnView/lib/platforms/libqxcb.so  | grep "not found"
    libxcb-icccm.so.4 => not found
    libxcb-image.so.0 => not found
    libxcb-keysyms.so.1 => not found
    libxcb-render-util.so.0 => not found
    libxcb-xkb.so.1 => not found
    libxkbcommon-x11.so.0 => not found
    libxcb-icccm.so.4 => not found
    libxcb-image.so.0 => not found
    libxcb-keysyms.so.1 => not found
    libxcb-render-util.so.0 => not found
    libxcb-xkb.so.1 => not found
    libxkbcommon-x11.so.0 => not found
    libicui18n.so.56 => not found
    libicuuc.so.56 => not found
    libicudata.so.56 => not found
  1. I installed the missing packages.
sudo apt install libxcb-image0
sudo apt install libxcb-keysyms1
sudo apt install libxcb-render-util0
sudo apt install libxcb-xkb1
sudo apt install libxkbcommon-x11-0

Problem solved.

3
  • 1
    Fixed the same problem for me. Thanks a lot.
    – rpr
    Feb 26, 2021 at 14:18
  • 1
    my man!! thank you very much for this very detailed, very easy to understand fix! worked perfectly for me in ubuntu 18.04 even though it was for a totally different software
    – argaiv
    May 19, 2021 at 20:35
  • Fixed using this solution same issues on 16.04
    – 0x8BADF00D
    Feb 23, 2022 at 4:38
1

I ran into this issue trying to run wireshark. I fixed with xhost +. I'm not sure why I needed that now, but it was failing to open the wireshark display.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .