我在运行pyqt5,以及使用cv2打开摄像头准备显示图例时,报错:
arm_release_ver: g13p0-01eac0, rk_so_ver: 10
Cannot find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
复制代码root@myd-lr3576x-debian:/userdata/myenv# QT_DEBUG_PLUGINS=1 python3 pyqt5_test.py
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"archreq": 0,
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"archreq": 0,
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archreq": 0,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimalegl"
]
},
"archreq": 0,
"className": "QMinimalEglIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"archreq": 0,
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"archreq": 0,
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
loaded library "Xcursor"
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platformthemes" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platformthemes" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata=
{
"IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
"MetaData": {
"Keys": [
"compose",
"xim"
]
},
"archreq": 0,
"className": "QComposePlatformInputContextPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("compose", "xim")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
{
"IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
"MetaData": {
"Keys": [
"ibus"
]
},
"archreq": 0,
"className": "QIbusPlatformInputContextPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("ibus")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforminputcontexts" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
"MetaData": {
"Keys": [
"xcb_egl"
]
},
"archreq": 0,
"className": "QXcbEglIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("xcb_egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so"
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
"MetaData": {
"Keys": [
"xcb_glx"
]
},
"archreq": 0,
"className": "QXcbGlxIntegrationPlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("xcb_glx")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/xcbglintegrations" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so"
arm_release_ver: g13p0-01eac0, rk_so_ver: 10
Cannot find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
段错误
复制代码import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
window = QWidget()
window.show()
sys.exit(app.exec_())
复制代码PyQt版本信息:
root@myd-lr3576x-debian:/userdata/myenv# pip show PyQt5
Name: PyQt5
Version: 5.15.9
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: <a href="mailto:info@riverbankcomputing.com">info@riverbankcomputing.com</a>
License: GPL v3
Location: /usr/lib/python3/dist-packages
Requires: PyQt5-sip
Required-by:
复制代码在.profile后面添加export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/,然后就可以正确运行了。