且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载Qt平台插件"xcb",在“"中即使被发现

更新时间:2022-06-16 23:57:04

该错误似乎是 Qt 库冲突.链接器找不到正确的 Qt 库(安装在/opt 文件夹中),这是我在conda虚拟机中自定义构建的 OpenCV 所必需的环境.这是因为在虚拟环境中安装了另一个 Qt 库.这可以通过使用 ldd 找到.(对不起,是前一段时间,所以我没有输出.)

The error seems to be the Qt library conflict. The linker couldn't find the correct Qt library (installed in /opt folder) which is required by my custom built OpenCV in the conda virtual environment. This is because there is another Qt library installed in the virtual environment. And this can be found by using ldd. (Sorry, it was some time ago so I don't have the output.)

按预期,通过删除虚拟conda环境中的所有与Qt相关的库,使用 Qt 构建的 OpenCV 库(安装在/opt中文件夹)照常运行.

As expected, by removing all the Qt-related libraries in the virtual conda environment, the OpenCV library which was built with Qt (installed in /opt folder) works properly as usual.