Round1:
After installation, execute the QTCreator prompt:
Linux qt “qt.qpa.plugin: Could not load the Qt platform plugin “xcb” ”
sudo gedit ~/.bashrc
sudo gedit ~/.bashrc
sudo gedit ~/.bashrc
export QT_DEBUG_PLUGINS=1
export LD_LIBRARY_PATH=/opt/Qt5.13.1/5.13.1/gcc_64/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/Qt5.13.1/Tools/QtCreator/lib:$LD_LIBRARY_PATH
The last two sentences are from the link library path added to the search path, do not know whether to work.
Emphasized in fact the first sentence here, and after the configuration items, QtCreator will output a lot of information, so we can be targeted, step by step to solve the problem/
the changes to take effect
sudo source ~/.bashrc
round2:
Execute the QtCreator program again from the command line, and output a bunch of log information. Skip to the end to find a prompt:
always load the library/opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb. So: (libxkbcommon – x11. So. 0: unable to open the Shared object file: Don’t have that file or directory)
QLibraryPrivate: : loadPlugin failed on “/ opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb. So” : “Always load the library/opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb. So: (libxkbcommon – x11. So. 0: unable to open the Shared object file: no files or directories)”
obviously failure load of dynamic link library, first check whether there is the file exists, then look at whether the dependent libraries are able to find success:
ldd /opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so
Libxkbcommon is not available, you need to install the library, use yum to install:
yum -y install libxkbcommon-x11-devel
Round 3 lacks DBUS
If you continue, there is still an error. If you skip to the last line, there is still an error
/ opt/Qt5.13.1/Tools/QtCreator/bin/QtCreator: relocation error:/opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms /.. /.. /lib/ libqt5dbus.so.5: Symbol dbus_message_set_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libbus-1.so.3 with link time reference
yum -y install dbus-devel
round4
Continue with the following error
Opt/Qt5.13.1/Tools/QtCreator/bin/QtCreator: symbol lookup error:/opt/Qt5.13.1/Tools/QtCreator/lib/Qt/plugins/platforms /.. /.. /lib/ libqt5xcbqpa.so.5: undefined Symbol: FT_GET_FONT_FORMAT
yum -y install freetype-devel
Export QT_DEBUG_PLUGINS=1. You may not have the same problem as me, but with the output, you can solve it step by step.
Read More:
- WSL start QT error qt.qpa.xcb : could not connect to display :0.0
- python: This application failed to stat could not find or load the Qt platform plugin “windows”
- This application failed to start because it could not find or load the Qt platform plugin “windows”.
- This application failed to start because it could not find or load the QT platform
- QT learning 3: configuration and testing of QT creator 2.4.1 development environment
- Can not start, can not find QT pligins “windows” problem after installing QT vs environment 2021-06-13
- Qt Failed opening project “xxx“: No plugin can open project type “text/plain“
- QGIS uses qt4.6.3 to upgrade to the version compiled by qt4.8.3
- Configuration, compilation and installation of vtk8.1 in qt5.9
- Compilation errors and warnings encountered in QT and their solutions
- Summary of problems encountered in using OpenGL in QT
- Error: undefined reference to ‘CV:: xxx’ encountered in using OpenCV in QT
- The app failed to start because there is no Qt platform to initialize
- Import any QT binding error during installation of evo
- VTK + QT + vs compilation and installation configuration
- Record the problems encountered when VTK is used with QT
- Upgrading QT4 project to Qt5 project
- Installing qt5.8.0 error reporting during installation process
- Qt5_ Various paths
- Failed to load plugin react: cannot find module ‘eslint plugin react’ appears when running Vue project‘