在使用wgdi的dotplot命令时,没有成功运行并报错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.
造成这个问题的原因可能是libxcb.so中缺少包,因此需要先知道缺少哪些包,之后再安装相应的软件包,即可解决这个问题。
尝试了百度上很多办法,走了很多弯路,也没有解决,以下是我解决这个问题的方法,可以参考这篇博客:(4条消息) Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题_盼小辉丶的博客-CSDN博客我使用的是ubuntu子系统,可以在win的文件管理器中查找libxcb.so,找到libxcb.so所在的位置
$ cd /home/liu/wgdiceshi/platforms
注意cd后的文件路径为你自己的文件路径,还有就是在win的文件管理器中复制的文件路径为"\"需要改为“/”。
在当前文件路径下运行 ldd libqxcb.so
$ ldd libqxcb.so
会出现以下内容:
linux-vdso.so.1 (0x00007fff859f3000)
libQt5XcbQpa.so.5 => not found
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f625b799000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f625b6da000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f625b6be000)
libQt5Gui.so.5 => not found
libQt5DBus.so.5 => not found
libQt5Core.so.5 => not found
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f625b634000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f625b611000)
libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f625b60c000)
libxcb-icccm.so.4 => not found
libxcb-image.so.0 => not found
libxcb-atom.so.1 => not found
libxcb-aux.so.0 => not found
libxcb-event.so.1 => not found
libxcb-keysyms.so.1 => not found
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f625b5f7000)
libxcb-render-util.so.0 => not found
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f625b5e6000)
libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f625b5e1000)
libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f625b5d7000)
libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f625b5cd000)
libxcb-xinerama.so.0 => /lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007f625b5c8000)
libxcb-xkb.so.1 => not found
libxcb-xinput.so.0 => not found
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f625b59c000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f625b597000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f625b582000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f625b445000)
libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007f625b43a000)
libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007f625b41a000)
libxkbcommon-x11.so.0 => not found
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f625b3d8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f625b3d2000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f625b1f0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f625b0a1000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f625b084000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f625ae92000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f625ae64000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f625ae5b000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f625ae23000)
libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f625ad6b000)
libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f625ad35000)
/lib64/ld-linux-x86-64.so.2 (0x00007f625b7f9000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f625ad2f000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f625ad27000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f625ad0d000)
在这其中的libQt5XcbQpa.so.5 => not found,说明缺少libQt5XcbQpa.so.5,安装libqt5gui5软件包,来补全缺失的包。文章来源:https://www.toymoban.com/news/detail-724500.html
如果还缺少包,只需要安装相应的软件包就行,至此我电脑的这个问题解决了。文章来源地址https://www.toymoban.com/news/detail-724500.html
到了这里,关于Ubuntu20.04 解决qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!