gpt4 book ai didi

linux - 无法将 Qt 应用程序作为独立应用程序运行

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:24:31 25 4
gpt4 key购买 nike

我尝试创建独立 Web 应用程序的步骤

主机是 Ubuntu 14.04,64 位操作系统。

Qt 版本 - Qt5.6。

在虚拟 Box Ubuntu 14.04、64 位操作系统上进行测试。

应用程序在主机上正常运行。

我复制了所有 Web 相关文件和进程、平台相关文件和可执行文件所在的 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)

谁能指导我解决上述问题。

提前致谢。

最佳答案

你有在虚拟盒子中运行的桌面版 Ubuntu 吗?

您是否在 VM 选项中启用了“启用 3D 加速”。

您是否安装了 Virtualbox 视频驱动程序?

问题是 QtWebengine 需要 OpenGL 才能工作,这就是您收到此错误的原因:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

关于linux - 无法将 Qt 应用程序作为独立应用程序运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37547439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com