前言:
有些时候,因为重新安装Gstreamer环境的缘故,有时候会发现找不到一些插件,比如在
gst-inspect-1.0 avdec_h264提示找不到。
现象:
(gst-plugin-scanner:5612): GStreamer-WARNING : 13:49:54.722: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstchromaprint.so': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block (gst-plugin-scanner:5612): GStreamer-WARNING : 13:49:54.900: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block No such element or plugin 'avdec_h264'
解决办法:
1)执行删缓存命令: rm .cache/gstreamer-1.0/registry.aarch64.bin
2)加到.bashrc文件最后 export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1:$LD_PRELOAD
(这里注意,以上是arm系统的命令,如果是其他架构,需要自行替换,比如虚拟机usr/lib/x86_64-linux-gnu/libgomp.so.1:$LD_PRELOAD , 提示缺少什么就增加什么)
3)再执行: source ~/.bashrc 再尝试就可以了