我尝试创建独立Web应用程序的步骤
主机PC是Ubuntu 14.04,64位操作系统。
Qt版本 - Qt5.6。
在虚拟Box Ubuntu 14.04,64位操作系统上进行测试。
应用程序在主机PC中正常运行。
我复制了所有与网络相关的文件&进程,平台相关文件和存在可执行文件的lib文件,然后我将库路径重定向到可执行文件的当前工作目录。
command used : chrpath -r ./lib AppName
然后当我运行应用程序时它打破了
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
我在libqxcb.so上运行了ldd来查找依赖文件。
command : ldd libqxcb.so
我通过手动处理"未找到的文件来解决这个问题"到/ usr / lib路径
libQt5XcbQpa.so.5
libQt5DBus.so.5
libQt5Core.so.5
libQt5Gui.so.5
现在应用程序因以下错误而中断:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Qt WebEngine data directory not found at location /home/user/Qt5.5.1/5.5/gcc_64. Trying application directory...
Qt WebEngine Plugins directory not found. Trying fallback directory... Plugins as for example video codecs MAY NOT work.
Installed Qt WebEngine locales directory not found at location /home/user/Qt5.5.1/5.5/gcc_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine data directory not found at location /home/user/Qt5.5.1/5.5/gcc_64. Trying application directory...
Qt WebEngine Plugins directory not found. Trying fallback directory... Plugins as for example video codecs MAY NOT work.
Installed Qt WebEngine locales directory not found at location /home/user/Qt5.5.1/5.5/gcc_64/translations/qtwebengine_locales. Trying application directory...
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
Segmentation fault (core dumped)
任何人都可以指导我解决上述问题。
提前致谢。
答案 0 :(得分:0)
您是否在虚拟机中运行了桌面版的Ubuntu?
您是否已启用"启用3D加速"在VM选项中。
您安装了Virtualbox视频驱动程序吗?
问题是QtWebengine需要OpenGL才能正常工作,这就是你收到此错误的原因:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled