Dynamic library problem when running deepstream-app in local folder

jetson nano + deepstream 5.0
I created a folder in nano to save the code for deepstream 5.0,I modified the code of gst-dsexample and compiled it, and stored the generated libnvdsgst_dsexample.so in the local folder /home/abc/deepstream-5.0/lib/gst-plugins,At the same time, in the makefile of deepstream-app, add the path linking this so


Compilation can pass, but it is still linked at libnvdsgst_dsexample.so under /opt/nvidia/deepstream/deepstream-5.0/lib/gst-plugins。
What can I do to solve this problem?
Thank you!

First you need to uninstall the original plugin if you want another plugin to replace it.
Why do you want to change the gstreamer install path? Do you have knowledge about gstreamer plugin registration and search path? It is not convenient since the other plugins are still in the original path.
If you really want to change/adding plugin path, please refer to:
https://gstreamer.freedesktop.org/documentation/gstreamer/running.html?gi-language=c

I would like to know how to uninstall the plug-in, such as uninstall gst-dsexample?

The easiest way is to remove the *.so file.

Yes, I tried to delete libnvdsgst_dsexample.so, the running program will prompt :failed to create ‘dsexample0’, where should I put my compiled libnvdsgst_dsexample.sofang zai?

Can “gst-inspect-1.0” get the plugin? If not, please refer to https://gstreamer.freedesktop.org/documentation/gstreamer/running.html?gi-language=c

Why do you want to change the plugin install path? It is not convenient since the other plugins are still in the original path.

I have a new project myself, it may not be convenient to put the project code in the /opt directory

No, I will check the link you mentioned

Will you still using the plugins provided by DeepStream SDK? If so, you don’t need to change the install path

Yes, I will still using the plugins provided by DeepStream SDK, and I will consider your suggestions,thank you!