"error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory" when running TRTorch sample
I'm trying to compile my pytorch model with TRTorch engine.
I've installed TRTorch according to this link. 
When the sample code is run (with the below command from this link) the given error arise: 
sudo bazel run //cpp/trtorchexec -- $(realpath /home/TRTorch/tests/modules/alexnet_scripted.jit.pt) &quot;(1,3,227,227)&quot;

error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory

Also, the LD_LIBRARY_PATH is set correctly.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/TensorRT/TensorRT-7.0.0.11/lib

More info:

TRTorch: latest version (python package and binary) 
TensorRT: 7.0.0.11 
Pytorch: 1.5.1 
CUDA: 10.2 
Python: 3.6


I asked this question in TRTorch github and fixed it using:
sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/TensorRT/TensorRT-7.0.0.11/lib bazel run //cpp/trtorchexec $(realpath tests/models/alexnet_traced.jit.pt) &quot;(32 3 227 227)&quot;
The issue is available here.
