(Qt 5.4.1) This application failed to start because it could not find or load the Qt platform plugin “xcb”

前端 未结 9 1489
陌清茗
陌清茗 2020-11-30 11:57

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.

9条回答
  •  忘掉有多难
    2020-11-30 12:45

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

    See the accompanying web page, scroll down to heading "Qt Plugins". See first paragraph.

    libqxcb.so is required, even if you link the rest statically.

    http://doc.qt.io/qt-5/linux-deployment.html#application-dependencies

    Qt have probably written their source code software to work in the following way: Instead of allowing libqxcb.so to be loaded at startup automatically (using rpath's) they use a dlopen() function to load it, as part of their QPA function set, soon after main() begins.

    So this completely disregards our attempt to include all the "xcb" functions statically.

    If their dlopen() fails they just trot out their error message we all know and hate, and then call signal 6 to abort it (quite unnecessarily) instead of exiting normally.

提交回复
热议问题