Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
468 views
in Technique[技术] by (71.8m points)

c++ - (Qt 5.4.1) This application failed to start because it could not find or load the Qt platform plugin "xcb"

I reinstalled my ubuntu 14.04 and Qt 5.4.1 and Qtcreator.

Qt 5.4.1 was built from source with "-opensource -nomake-test -nomake-example" configure options.

When I open an old project in QtCreator and build it everything's OK.

But when I run this project it shows:

This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: linuxfb, minimal, offscreen, xcb.

Reinstalling the application may fix this problem. Aborted (core dumped)

So I googled this problem and tried everything. I installed every packages (libxcb series) but nothing can help!

Somebody help me please...

I tried your methods.

When I run ldd command in platform directory, It shows: ldd libqxcb.so under platform$

You can see that nothing is missing. And actually I have made a softlink in the platform directory called libqxcb.so. There was no libqxcb.so in my platform directory before.

And when I run ldd command to my executable. it shows: executable shot

And you can see the error when I execute this file.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For a similar issue, in my case I solved with:

export QT_PLUGIN_PATH=<qt base path>/plugins

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...