解决报错:Could not get EGL display connection GStreamer-WARNING **: 14:43:51.245: Failed to load plugin

解决报错:Could not get EGL display connection GStreamer-WARNING **: 14:43:51.245: Failed to load plugin

今天,部署deepstream_lpr_app项目时,出现了以下的错误,奇怪的是,在第一部署的时候并没有出现以下错误,由于重新装了下系统,再次部署时,却发现了以下的错误。

因此,特写此文,一方面,希望自己以后再次遇到此问题时,能够更加快速地解决;另一方面,希望能够帮助到其他的人。

当我进行模型推理的时候,报出One element could not be created. Exiting.的错误。

于是我输入以下命令,

gst-inspect-1.0

唉,又报错了。

完整报错

nvbuf_utils: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection

(gst-plugin-scanner:31996): GStreamer-WARNING **: 14:43:26.410: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection

(gst-plugin-scanner:31998): GStreamer-WARNING **: 14:43:30.700: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:32003): GStreamer-WARNING **: 14:43:31.229: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection

(gst-plugin-scanner:32010): GStreamer-WARNING **: 14:43:36.028: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so: undefined symbol: NvBufSurfTransformAsync
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection

(gst-plugin-scanner:32017): GStreamer-WARNING **: 14:43:48.951: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so: undefined symbol: NvBufSurfTransformAsync
nvbuf_utils: Could not get EGL display connection

(gst-plugin-scanner:32017): GStreamer-WARNING **: 14:43:51.245: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstlibav.so': /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

突然发现,相比第一次部署,竟然报出了这么多的错误,憨憨的我赶紧查了下自己系统的版本。

版本情况如下

CUDA版本:10.2

tensorrt版本:8.0.1.6

JetPack版本:32.6.1

deepstream版本:6.0

官网的系统版本适配图如下:

通过对比发现:我的版本是没有问题的。于是开始细细地检查报错。

第一种类别报错

报错如下
nvbuf_utils: Could not get EGL display connection
No EGL Display
nvbufsurftransform: Could not get EGL display connection
No EGL Display
解决方法
unset DISPLAY
rm ${HOME}/.cache/gstreamer-1.0/registry.*

输入上面的命令的目的是:将DISPLAY的值设为:0

可以输入以下的命令查看:

echo $DISPLAY
# 输出为 :0

如果上述的命令并没有将DISPLAY的值设为0,请使用下面这种方法:

export DISPLAY=:0

然后再次输入命令查看:

echo $DISPLAY
# 输出为 :0

其实第一类报错算是已经解决了。

再次输入:

gst-inspect-1.0

发现报错减少了,但是还有4个:

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.622: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.628: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.634: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so: undefined symbol: NvBufSurfTransformAsync

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.650: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so: undefined symbol: NvBufSurfTransformAsync

说明第一类的报错已经解决了。

第二类报错

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.622: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.628: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.634: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so: undefined symbol: NvBufSurfTransformAsync

(gst-plugin-scanner:32277): GStreamer-WARNING **: 15:05:17.650: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so: undefined symbol: NvBufSurfTransformAsync
参考

https://blog.csdn.net/zong596568821xp/article/details/121231336

通过这篇文章发现,这些问题是Deepstream6.0所为解决的问题,可以忽略。

重新推理,得到正确的结果了。

至此,小记结束。

  • 6
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
根据引用和引用的信息,当你在Ubuntu 18.04上使用Qt时,可能会遇到"qt.qpa.plugin: Could not load the Qt platform plugin"的错误,其中插件名称可以是"xcb"或"wayland-egl"等。 解决此问题的方法如下: 1. 确保安装了正确的Qt平台插件。根据引用,可用的平台插件包括:eglfs、linuxfb、minimal、minimalegl、offscreen、vnc、wayland-egl、wayland、wayland-xcomposite-egl、wayland-xcomposite-glx、webgl、xcb。请检查你的系统是否安装了相应的插件。 2. 检查Qt的安装路径。根据引用,确保Qt的插件目录正确设置。在错误信息中,可以看到插件目录的路径,如"/usr/lib/qt/plugins/platforms"。确保该目录存在,并且包含所需的平台插件。 3. 检查库依赖项。根据引用,错误信息中还提到了一些库文件的路径,如"/root/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/cv2/qt/plugins/platforms/libqxcb.so"。确保这些库文件存在,并且与Qt的版本和插件匹配。 4. 确保正确设置环境变量。有时,错误的环境变量设置可能导致Qt无法加载平台插件。请确保正确设置了QT_PLUGIN_PATH环境变量,并将其指向Qt插件目录。例如,可以将以下行添加到你的bash配置文件(如~/.bashrc)中: export QT_PLUGIN_PATH=/usr/lib/qt/plugins 然后重新加载配置文件或重新启动终端。 5. 尝试重新安装Qt应用程序。根据引用中的错误信息,重新安装应用程序可能会解决此问题。你可以尝试卸载并重新安装Qt应用程序,然后再次运行。 综上所述,如果你遇到"qt.qpa.plugin: Could not load the Qt platform plugin"错误,可以尝试上述方法来解决该问题。记得检查安装的插件,检查Qt的安装路径和库依赖项,设置正确的环境变量,并尝试重新安装应用程序。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

莫余

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值