qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

794 views
Skip to first unread message

p.os...@datec.at

unread,
Dec 16, 2024, 3:06:11 AM12/16/24
to leo-editor
I still have this problem on all of my Linux machines. It's not Leo's fault, of course. My hope is, I'm not the only one on Linux and someone has overcome this and knows a solution.

My workaround is to start Leo from a console after issueing

export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt6/plugins/platforms/  
export QT_PLUGIN_PATH=/usr/lib/qt6/plugins/platforms

I could place this in my .bashrc. OTOH that should not be necessary.

A lot is written about this problem if I google, but yet I couldn't find a post making me confident that that is the solution.

Cheers Paul

Thomas Passin

unread,
Dec 16, 2024, 8:16:45 AM12/16/24
to leo-editor
This seems to be a common problem on Linux, but it doesn't show up on all distros.  It's a problem between Qt and the various PATHs. Your solution is a reasonable one, whether or not you put it into .bashrc or another shell script.  On Linux, lately I've been putting Leo into a venv and running it with a shell script that activates the venv before launching Leo, so that would be a natural place to put the path exports. But you probably won't need them if you can re-install the .so libraries in question (see below).

Another solution that often works is to re-install the .so library mentioned in the error message.  The possible hitch there is that the .so name(s) given in the error message may not be the same ones the package manager uses.  If the package manager does not know about any of the names suggested in the error message, you may be able to find the right name at http://pkgs.org/.

Here's a decent page on Stack Exchange about the problem and possible solutions.  You may have found it already.  Note that some of the posters set up symbolic links but don't do that since they may mess up your system after an update:


I suspect that more recent distros, or maybe Qt versions, have got this figured out because I haven't gotten these errors in the last couple of Linux installs I've made (I spin up a lot of Linux VMs for testing purposes, and I always install Leo on them). One was EndeavourOS (an Arch-linux variant) and the other was a new ISO for Mint (which is Ubuntu-based).

Thomas Passin

unread,
Dec 16, 2024, 9:05:07 AM12/16/24
to leo-editor
I did get the same error message about missing xcb libraries on the new Mint VM.  I must have been thinking of another VM.  Anyway, I cured it by re-installing the library:

sudo apt-get install libxcb-cursor0
Reply all
Reply to author
Forward
0 new messages