Deepstream 5- deepstream-app: error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory

If you did not install TRT to system path, you need to explicitly dynamically link to it,
export LD_LIBRARY_PATH=/your TRT install library path/:$LD_LIBRARY_PATH