Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
QtWS: Super Early Bird Tickets Available!

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

Scheduled Pinned Locked Moved Solved Installation and Deployment
183 Posts 87 Posters 830.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    singhravi
    wrote on last edited by
    #51

    It Worked! :facepalm: :D
    Thanks a lot @hskoglund for helping me troubleshoot this! You're great.
    So the problem was a ~ from the beginning. This was too silly.
    Build is sucsessful and Package is running fine now.

    1 Reply Last reply
    2
  • hskoglundH Online
    hskoglundH Online
    hskoglund
    wrote on last edited by
    #52

    Hah, so it was a ~ that sent you on a wild goose chase!
    (tildes can be a PITA, I remember tripping on them when trying to ssh into Ubuntu from Windows)
    Anways, glad to hear its working now :-)

    1 Reply Last reply
    2
  • J Offline
    J Offline
    Jalpesh
    replied to hskoglund on last edited by
    #53

    @hskoglund thank Man!

    sudo apt remove qtchooser
    sudo apt install libqt5gui5

    boom.... its work

    1 Reply Last reply
    0
  • C Offline
    C Offline
    chEguy
    wrote on last edited by chEguy
    #54

    Guys I still am getting this error

    qt.qpa.xcb: could not connect to display :0
    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, xcb.
    Aborted

    BTW I am using Ubuntu20 on Windows10 with xcvsrv as X server

    C 1 Reply Last reply
    0
  • C Offline
    C Offline
    chEguy
    replied to chEguy on last edited by
    #55

    I actually am not able to connect it to the display

    Please help

    1 Reply Last reply
    0
  • hskoglundH Online
    hskoglundH Online
    hskoglund
    wrote on last edited by
    #56

    Hi just guessing but maybe the solution in this post will help you too.

    1 Reply Last reply
    1
  • M Offline
    M Offline
    Matriarch
    replied to Lengendary on last edited by
    #57

    @Lengendary This is working solution for me, thank you

    sudo apt-get install libxcb-xinerama0

    V 1 Reply Last reply
    3
  • A Offline
    A Offline
    aurelien
    wrote on last edited by
    #58

    I know it is considered as a good software to build good software, but the point is here:

    When you follow an installation guide step by step and make everything correctly, and the stuff does not works, that just mean it have been made with foot (from the stuff to the documentation.)

    Really for thus who do their best, but it just not works on Debian 10 without doing weird things that should not be done out of the installation documentation.

    Good luck

    1 Reply Last reply
    0
  • O Offline
    O Offline
    Obed
    replied to Srinivas Reddy on last edited by
    #59

    @Srinivas-Reddy Thanks. That helped me

    1 Reply Last reply
    0
  • M Offline
    M Offline
    Megan S
    wrote on last edited by
    #60

    Thanks for all the helpful info on the thread!!

    I am attempting an anaconda environment creation... I don't have admin privileges on the system I'm working on. It's Ubuntu16.04.1 LTS (Xenial Xerus)"

    The error I get is below. I'm assuming that because I'm using the anaconda install vs using apt-get, I can't just easily reinstall? It looks to me as if I'm missing the libxcb-xinerama.so.0 package. I checked qmake --version, the output shows Qt version 5.9.7

    Thanks for any suggestions!

    QLibraryPrivate::loadPlugin failed on "/export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/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.

    $ qmake --version
    QMake version 3.1
    Using Qt version 5.9.7 in /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib

    jsulmJ 1 Reply Last reply
    0
  • jsulmJ Offline
    jsulmJ Offline
    jsulm Lifetime Qt Champion
    replied to Megan S on last edited by
    #61

    @Megan-S said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

    libxcb-xinerama.so.0: cannot open shared object file: No such file or directory

    So do you have libxcb-xinerama.so.0?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    2
  • M Offline
    M Offline
    mathsbloke
    replied to Srinivas Reddy on last edited by
    #62

    @Srinivas-Reddy Many thanks, that got mine working too!

    1 Reply Last reply
    0
  • C Offline
    C Offline
    C0K01
    replied to Srinivas Reddy on last edited by
    #63

    @Srinivas-Reddy Many thanks!

    1 Reply Last reply
    0
  • J Offline
    J Offline
    Jimit Rupani
    replied to Advig on last edited by
    #64

    @Advig said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

    1. export QT_DEBUG_PLUGINS=1

    2. export PATH=$PATH:~/Qt/Tools/QtCreator/bin

    3. libxcb dependency so https://unix.stackexchange.com/questions/338519/how-to-install-libxcb gave the solution.

    sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev

    1. sudo apt-get install libxkbcommon-x11-dev

    solved my problem for ubuntu 20.04. Tried reinstalling almost 3 times before the solution. Hope it helps someone

    A 1 Reply Last reply
    2
  • coffeesmokeC Offline
    coffeesmokeC Offline
    coffeesmoke
    wrote on last edited by
    #65

    So, Debian 10:

    1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

    libxcb-util.so.1 => not found

    1. Ok, continue...
      sudo find /usr/lib | grep libxcb-util
      ...
      libxcb-util.so.0.0.0
      libxcb-util.so.0.0
      libxcb-util.so.0
      , but need
      libxcb-util.so.1

    2. Ok, Debian... :) Redy?
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

    QtCreator start complete! :))))

    1 B N R 4 Replies Last reply
    8
  • S Offline
    S Offline
    stounhange7
    wrote on last edited by
    #66

    @coffeesmoke thanks for the help. you revived my qt on debian 10

    1 Reply Last reply
    0
  • 1 Offline
    1 Offline
    1init
    replied to coffeesmoke on last edited by 1init
    #67

    @coffeesmoke thank you for this i ran the debian 9 instructions after installing the updates and had this issue
    i run devuan

    1 Reply Last reply
    0
  • M Offline
    M Offline
    Malachi
    wrote on last edited by Malachi
    #68

    That symlink seems a little risky. Two worries:

    • What happens when the actual v1+ of the actual libxcb-util attempts to install?
    • Are you 100% sure Qt Creator isn't depending on a different API? Seems like a dice roll

    I admit though, it's better than nothing

    EDIT: A few minutes of browsing https://gitlab.freedesktop.org/xorg/lib/libxcb-util/-/blob/master/NEWS suggests that no API changes are there and that symlinking is probably API compliant in this case. Funny that Debian is 6 years behind on this lib. No judging. I know they gotta test stuff. Just funny :)

    S 1 Reply Last reply
    0
  • S Offline
    S Offline
    SlySven
    replied to Malachi on last edited by
    #69

    Assuming that version 0 of something is a pre-first version release and that Devuan 3.0 "Beowulf" (systemd-less fork of Debian 10.0 "Buster") only has the 0.0.0 version then I guess symlinking the 0.0.0 to the 1.0.0 is the only chance we've got. I just got clobbered by this when running the Qt Creator updater from within the last version that was giving me Qt 5.15.1 that told me that there was an update available. It is a real PITA when it upgraded itself out of working...

    ... however this topic has worked for me.

    BTW The Devuan libxcb-util 0.0.0 version libraries do date back to 20 Aug 2014!

    1 Reply Last reply
    0
  • B Offline
    B Offline
    beetree
    replied to coffeesmoke on last edited by
    #70

    @coffeesmoke

    As for Debian. The correct library is found as of Debian 11. Which at the moment is in testing.

    • Qt application fails to start on Debian 10 Buster because libqxcb.so requires missing libxcb-util.so.1

    Symlink to a different library version is a possible workaround, but does not guarantee everything else works as expected, and as such ill advised.

    coffeesmokeC 1 Reply Last reply
    0

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved