Deepstream-app: error while loading shared libraries: libnvinfer.so.6: cannot open shared object file + ubuntu 18.04

Yes, I did that before. But then I can see only C language apps inside SDK. So I tried for Python apps.
Now I removed all deepstream folders and files and reinstalled again. When I run ./install , I get below output:

update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/lib/gst-plugins because link group deepstream-plugins is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/lib/libnvv4l2.so because link group deepstream-v4l2library is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/lib/libnvv4lconvert.so because link group deepstream-v4lconvert is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-app because link group deepstream-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-test1-app because link group deepstream-test1-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-test2-app because link group deepstream-test2-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-test3-app because link group deepstream-test3-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-test4-app because link group deepstream-test4-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-test5-app because link group deepstream-test5-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-user-metadata-app because link group deepstream-user-metadata-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-dewarper-app because link group deepstream-dewarper-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-nvof-app because link group deepstream-nvof-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-image-decode-app because link group deepstream-image-decode-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-gst-metadata-app because link group deepstream-gst-metadata-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-perf-demo because link group deepstream-perf-demo is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-segmentation-app because link group deepstream-segmentation-app is broken
update-alternatives: warning: forcing reinstallation of alternative /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-infer-tensor-meta-app because link group deepstream-infer-tensor-meta-app is broken

Now If I try ‘deepstream-app’ command then I get warnings:

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.585: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.585: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.585: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_eglglessink.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.586: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.586: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.586: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.586: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ofvisual.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.586: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_of.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.589: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_segvisual.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.589: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistreamtiler.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.589: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_jpegdec.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.589: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dewarper.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.590: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:26030): GStreamer-WARNING **: 15:09:19.590: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so': libcudart.so.10.1: cannot open shared object file: No such file or directory
** ERROR: <main:602>: Specify config file with -c option
Quitting
App run failed

And if I try Python app: python3 deepstream_test_1.py /home/archana/deepstream/samples/sample_720p.h264

Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Unable to create Nvv4l2 Decoder
Unable to create NvStreamMux
Unable to create pgie
Unable to create nvvidconv
Unable to create nvosd
Creating EGLSink

Unable to create egl sink
Playing file /home/archana/deepstream/samples/sample_720p.h264
Traceback (most recent call last):
File “deepstream_test_1.py”, line 263, in
sys.exit(main(sys.argv))
File “deepstream_test_1.py”, line 196, in main
streammux.set_property(‘width’, 1920)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

This is same error, when 2 days ago I tried some dependent package installation with TensorRT and opened an issue Unable to create Nvv4l2 Decoder, NvStreamMux, pgie, nvvidconv, nvosd: Error while running DeepStream 4.0.2 Python apps

I think I need to have a clean installation with exact versions required for DeepStream’s latest version. I’m already referring the installation guides from Nvidia’s site and still deepstream is not working for me. It would be great if you can guide me through exact versions and pre-installation requirements for DeepStream for Python apps.

Thank you,
Archana

your issue is you can not find these plugins, please check your environments.
refer to this, to remove deepstream-app
update-alternatives --remove deepstream-app /opt/nvidia/deepstream/deepstream-4.0/bin/deepstream-app
please see install.sh, having all the links removed and finally removed the installed package,
sudo rm -rf /opt/nvidia/deepstream/deepstream-4.0

Thanks for the reply @amycao. I will try to remove all possible deepstream symlinks, files and folders.

@amycao, I tried re-installation of deepstream, now libvinfer.so related errors are gone.
But still I’m unable to run the C or Python apps. Here are the errors:
$ GST_DEBUG=3 deepstream-app -c samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt

Output:

0:00:00.009797334  4706 0x55aa29c33180 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "nvstreammux"!
** ERROR: <create_multi_source_bin:714>: Failed to create element 'src_bin_muxer'
** ERROR: <create_multi_source_bin:777>: create_multi_source_bin failed
** ERROR: <create_pipeline:1045>: create_pipeline failed
** ERROR: <main:632>: Failed to create pipeline
Quitting
App run failed

And all other C deepstream-test apps are returning output: One element could not be created. Exiting.
With GST_DEBUG=3 the output is:

0:00:00.011145203  4918 0x561962006000 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "nvv4l2decoder"!
0:00:00.011171926  4918 0x561962006000 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "nvstreammux"!

And Python apps result:

$ python3 deepstream_test_1.py samples/streams/sample_720p.h264
Creating Pipeline 
 
Creating Source 
 
Creating H264Parser 

Creating Decoder 

 Unable to create Nvv4l2 Decoder 
 Unable to create NvStreamMux 
 Unable to create pgie 
 Unable to create nvvidconv 
 Unable to create nvosd 
Creating EGLSink 

 Unable to create egl sink 
Playing file samples/streams/sample_720p.h264 
Traceback (most recent call last):
  File "deepstream_test_1.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "deepstream_test_1.py", line 196, in main
    streammux.set_property('width', 1920)
AttributeError: 'NoneType' object has no attribute 'set_property'

I followed all app’s README steps and there were no errors. I cleared the cache also:

sudo rm ${HOME}/.cache/gstreamer-1.0/registry.x86_64.bin
sudo rm -rf ${HOME}/.cache/*

Still no luck. Providing few more inputs:
Result of ‘gst-inspect-1.0 -b’:

Blacklisted files:
  libnvdsgst_dsexample.so
  libnvdsgst_multistream.so
  libnvdsgst_dewarper.so
  libnvdsgst_jpegdec.so
  libnvdsgst_multistreamtiler.so
  libnvdsgst_segvisual.so
  libnvdsgst_of.so
  libnvdsgst_ofvisual.so
  libnvdsgst_tracker.so
  libgstnvvideoconvert.so
  libnvdsgst_infer.so
  libnvdsgst_eglglessink.so
  libnvdsgst_osd.so
  libgstnvvideo4linux2.so

Total count: 14 blacklisted files

Not sure why they are blacklisted.

My Cuda version is 10.2, which is configured with OpenCV. Do you think I should try only Cuda 10.1? Or is it due to my dGPU?

Can you try to remove the registry cache of gstreamer,
rm ~/.cache/gstreamer-1.0/registry.aarch64.bin to see if can solve the issue?

I already tried those commands:

sudo rm ${HOME}/.cache/gstreamer-1.0/registry.x86_64.bin
sudo rm -rf ${HOME}/.cache/*

gst-inspect-1.0 /path to libnvdsgst_multistream.so/
in your case if you use install.sh to install deepstream, should be
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so
will print out why it blacklisted.

The output of :
gst-inspect-1.0 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so

(gst-inspect-1.0:2597): GStreamer-WARNING **: 15:03:26.455: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so': libcudart.so.10.1: cannot open shared object file: No such file or directory
Could not load plugin file: Opening module failed: libcudart.so.10.1: cannot open shared object file: No such file or directory

There are so many such warnings for ‘gst-inspect-1.0 -b’

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.453: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.454: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.456: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_eglglessink.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.459: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.461: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.463: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.465: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ofvisual.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.466: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_of.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.473: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_segvisual.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.475: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistreamtiler.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.479: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_jpegdec.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.481: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dewarper.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.483: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so': libcudart.so.10.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:2587): GStreamer-WARNING **: 15:02:11.486: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so': libcudart.so.10.1: cannot open shared object file: No such file or directory
Blacklisted files:
  libnvdsgst_dsexample.so
  libnvdsgst_multistream.so
  libnvdsgst_dewarper.so
  libnvdsgst_jpegdec.so
  libnvdsgst_multistreamtiler.so
  libnvdsgst_segvisual.so
  libnvdsgst_of.so
  libnvdsgst_ofvisual.so
  libnvdsgst_tracker.so
  libgstnvvideoconvert.so
  libnvdsgst_infer.so
  libnvdsgst_eglglessink.so
  libnvdsgst_osd.so
  libgstnvvideo4linux2.so

Total count: 14 blacklisted files

I think I need to try only ‘gst-inspect-1.0 libnvdsgst_multistream.so

Plugin Details:
  Name                     libnvdsgst_multistream.so
  Description              Plugin for blacklisted file
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so
  Version                  0.0.0
  License                  BLACKLIST
  Source module            BLACKLIST
  Binary package           BLACKLIST
  Origin URL               BLACKLIST


  0 features:

Hi @amycao,

Any idea why these libs are blacklisted? Let me know if you need any more details from me.

Thanks,
Archana

Your issue is
(gst-inspect-1.0:2597): GStreamer-WARNING **: 15:03:26.455: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so’: libcudart.so.10.1: cannot open shared object file: No such file or directory
Could not load plugin file: Opening module failed: libcudart.so.10.1: cannot open shared object file: No such file or directory
Do you have cuda 10.1 installed in your system?

1 Like

I have Cuda 10.2, which is configured with OpenCV

please install cuda 10.1 and try again.

Ok. I am using this CUDA 10.2 with OpenCV and CuDNN combination for development. I can’t remove CUDA 10.02, but I think I can install another CUDA version 10.1 and use it in virtual environment for DeepStream Python setup.

@amycao, I have downloaded the docker image https://ngc.nvidia.com/catalog/containers/nvidia:deepstream and tried to run the C samples. Now this docker image have all required Cuda and TensorRT versions for Deepstream 4.0.2. Still the C samples are not working.

$ deepstream-app -c ~/deepstream_sdk_v4.0.2_x86_64/samples/configs/deepstream-app/config_infer_primary.txt

** ERROR: <create_multi_source_bin:714>: Failed to create element 'src_bin_muxer'
** ERROR: <create_multi_source_bin:777>: create_multi_source_bin failed
** ERROR: <create_pipeline:1045>: create_pipeline failed
** ERROR: <main:632>: Failed to create pipeline
Quitting
App run failed

And when tried to run Python samples, got below error:

$ python3 deepstream_test_1.py ~/deepstream_sdk_v4.0.2_x86_64/samples/streams/sample_720p.h264

Creating Pipeline 
 
Creating Source 
 
Creating H264Parser 

Creating Decoder 

 Unable to create Nvv4l2 Decoder 
 Unable to create NvStreamMux 
 Unable to create pgie 
 Unable to create nvvidconv 
Creating EGLSink 

Playing file /root/deepstream_sdk_v4.0.2_x86_64/samples/streams/sample_720p.h264 
Traceback (most recent call last):
  File "deepstream_test_1.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "deepstream_test_1.py", line 196, in main
    streammux.set_property('width', 1920)
AttributeError: 'NoneType' object has no attribute 'set_property'

When I downloaded the docker, install.sh was missing from deepstream sdk folder and I already tried to clear the cache sudo rm ${HOME}/.cache/gstreamer-1.0/registry.x86_64.bin

Please help me to setup deepstream setup at least in this docker image on my Ubuntu 18.04 Desktop.

Thanks,
Archana

config_infer_primary.txt is for nvinfer, you should use config source***

Ho @amycao,

I tried below source*** configs, but all have the same output:

deepstream-app -c ~/deepstream_sdk_v4.0.2_x86_64/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt

deepstream-app -c ~/deepstream_sdk_v4.0.2_x86_64/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt

deepstream-app -c ~/deepstream_sdk_v4.0.2_x86_64/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt


No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
** ERROR: <main:651>: Failed to set pipeline to PAUSED
Quitting
App run failed

If you not change the config, the output will be onto display, if you not set display environments, the error like this, you can change sink type to 1 Fakesink or 3 File.

[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=1

or

[sink1]
enable=1
type=3

Hi @amycao,

Changing below lines, worked for me.
[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=1

Thanks,
Archana