
i’m using ubuntu 12.04 and qt5.1. i compile my project with no
errors but when i try to launch my application on other machine i get
the following error:
Failed to load platform plugin "xcb". Available platforms are:
Annullato (core dump creato)
i add the required libraries to the ld_library_path:
linux-gate.so.1 => (0xb7705000)
libQt5Widgets.so.5 =>/home/computer/libs/libQt5Widgets.so.5 (0xb70c4000)
libQt5Core.so.5 =>/home/computer/libs/libQt5Core.so.5 (0xb6c42000)
libstdc++.so.6 =>/usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6b5c000)
libgcc_s.so.1 =>/lib/i386-linux-gnu/libgcc_s.so.1 (0xb6b3e000)
libc.so.6 =>/lib/i386-linux-gnu/libc.so.6 (0xb6995000)
libQt5Gui.so.5 =>/home/computer/libs/libQt5Gui.so.5 (0xb652a000)
libpthread.so.0 =>/home/computer/libs/libpthread.so.0 (0xb650f000)
libgobject-2.0.so.0 =>/home/computer/libs/libgobject-2.0.so.0 (0xb64bf000)
libglib-2.0.so.0 =>/home/computer/libs/libglib-2.0.so.0 (0xb63c6000)
libX11.so.6 =>/home/computer/libs/libX11.so.6 (0xb6292000)
libm.so.6 =>/home/computer/libs/libm.so.6 (0xb6266000)
libicui18n.so.51 =>/home/computer/libs/libicui18n.so.51 (0xb6044000)
libicuuc.so.51 =>/home/computer/libs/libicuuc.so.51 (0xb5eca000)
libdl.so.2 =>/home/computer/libs/libdl.so.2 (0xb5ec5000)
libgthread-2.0.so.0 =>/home/computer/libs/libgthread-2.0.so.0 (0xb5ec2000)
librt.so.1 =>/home/computer/libs/librt.so.1 (0xb5eb9000)
/lib/ld-linux.so.2 (0xb7706000)
libGL.so.1 =>/home/computer/libs/libGL.so.1 (0xb5e5a000)
libffi.so.6 =>/home/computer/libs/libffi.so.6 (0xb5e52000)
libpcre.so.3 =>/home/computer/libs/libpcre.so.3 (0xb5e16000)
libxcb.so.1 =>/home/computer/libs/libxcb.so.1 (0xb5df5000)
libicudata.so.51 =>/home/computer/libs/libicudata.so.51 (0xb48ac000)
libglapi.so.0 =>/home/computer/libs/libglapi.so.0 (0xb4895000)
libXext.so.6 =>/home/computer/libs/libXext.so.6 (0xb4882000)
libXdamage.so.1 =>/home/computer/libs/libXdamage.so.1 (0xb487e000)
libXfixes.so.3 =>/home/computer/libs/libXfixes.so.3 (0xb4878000)
libX11-xcb.so.1 =>/home/computer/libs/libX11-xcb.so.1 (0xb4875000)
libxcb-glx.so.0 =>/home/computer/libs/libxcb-glx.so.0 (0xb485d000)
libXxf86vm.so.1 =>/home/computer/libs/libXxf86vm.so.1 (0xb4856000)
libdrm.so.2 =>/home/computer/libs/libdrm.so.2 (0xb4849000)
libXau.so.6 =>/home/computer/libs/libXau.so.6 (0xb4845000)
libXdmcp.so.6 =>/home/computer/libs/libXdmcp.so.6 (0xb483e000)
but it doesn’t work. what is the problem?
i also try to reconfigure qt with the option -qt-xcb but it still doesn’t work.
ps. sorry for my bad english
2015年12月29日04分10秒
Please download this package:
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
You can check why it don't work by using:
export QT_DEBUG_PLUGINS=1
and make run your app in terminal
if it dosen't work try
locate libxcb.so.1
and write this path in
export LD_LIBRARY_PATH=/MY_PATH:$LD_LIBRARY_PATH
Linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误:This application failed to start because it could not find or load the Qt platform plugin "xcb".
Reinstalling the application may fix this problem.
出现这个错误,主要是因为qt5为了在多平台下更方便移植,使用了一种新的技术-----platform abstraction system (QPA),而它中的库又依赖于Qt5中的一个库文件libQt5DBus.so.5,所以,只要打包时只要加上这个文件就可以了。
linux下qt5程序打包步骤如下
1、把以下7个库文件放到/usr/lib目录下
libQt5Widgets.so.5
libQt5Gui.so.5
libQt5Core.so.5
libicui18n.so.51
libicuuc.so.51
libicudata.so.51
libQt5DBus.so.5
2、拷贝Qt5安装目录中的platforms目录,使它和你的Qt程序同级目录
现在你可以双击你的程序运行了呵呵
用终端进入到qtcreator的安装目录,在其目录下执行 /qtcreator,看看终端上显示什么错误。
解决方案一:
版本问题,找一下之前的版本试一下,qt就是这个比较坑
解决方案二:
请把你的编译错误信息贴出来,大家好给你帮忙啊
解决方案三:
编译出错应该是QT4到QT5的问题..现在好了 可是连接数据有问题 界面打不开
解决方案四:
out of memory,内存不够了。还是你数据库连接字符串不正确
解决方案五:
1.什么叫“能运行倒是编译没过”编译都没过怎么运行的?
2.下载一个老一点版本的QT吧,你们交作业总不会限定你们使用QT的版本
解决方案六:
你搜索一下,看看升级qt版本会不会出现这样的问题啊,要是会出现可能会有相似的解决方案
解决方案七:
去百度查一下吧,要学会自己解决问题,csdn这里其实对这种很不明确的问题更不容易解决。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)