docker容器安装deepstream6.0遇到的问题和解决方法

1. ModuleNotFoundError: No module named 'gi' 

报错

Traceback (most recent call last):
  File "deepstream_test_1.py", line 22, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

解决方法

sudo apt install libcairo2-dev libxt-dev libgirepository1.0-dev

pip install pycairo PyGObject

参考链接

python - No module named gi - Stack Overflow

2. gstmodule.c:31:10: fatal error: gst/gst.h: No such file or directory

这个是在运行deepstream_python_apps的示例时遇见的,在make时出问题

报错

make  all-recursive
make[1]: Entering directory '/root/gst-python'
Making all in common
make[2]: Entering directory '/root/gst-python/common'
Making all in m4
make[3]: Entering directory '/root/gst-python/common/m4'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/gst-python/common/m4'
make[3]: Entering directory '/root/gst-python/common'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/gst-python/common'
make[2]: Leaving directory '/root/gst-python/common'
Making all in gi
make[2]: Entering directory '/root/gst-python/gi'
Making all in overrides
make[3]: Entering directory '/root/gst-python/gi/overrides'
  CC       _gi_gst_la-gstmodule.lo
gstmodule.c:31:10: fatal error: gst/gst.h: No such file or directory
 #include <gst/gst.h>
          ^~~~~~~~~~~
compilation terminated.
Makefile:504: recipe for target '_gi_gst_la-gstmodule.lo' failed
make[3]: *** [_gi_gst_la-gstmodule.lo] Error 1
make[3]: Leaving directory '/root/gst-python/gi/overrides'
Makefile:401: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/root/gst-python/gi'
Makefile:481: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/gst-python'
Makefile:412: recipe for target 'all' failed
make: *** [all] Error 2

解决方法

# 我运行apt install libjson-glib-dev后没有解决问题,不确定是否是必需的库,以防万一一起写进来了
apt install libjson-glib-dev 
apt install libgstreamer-plugins-base1.0-dev

参考链接

No such file or directory #include <gst/gst.h> - DeepStream SDK - NVIDIA Developer Forums

https://github.com/baedert/corebird/issues/189#issuecomment-48105184 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值