Is it possible to install different version of TensorRT in same Ubuntu system?

I just download the last TensorRT version, it is 3.0, and there are choice for CUDA 8.0 or CUDA 9.0, I just install the TensorRT 3.0 + CUDA 9.0 in Ubuntu 16.04 because CUDA 9.0 is the last version when I download TensorRT(CUDA is go to 9.1 now). But now the .prototxt/.caffemodel file can’t pass buildCudaEngine call, so I installed the TensorRT 2.1 + CUDA 8.0GA2, but I can’t make the gcc to link with TensorRT 2.1 because the seem dones’t exist. There is only one include “NvInfer.h” file in system as I install two version TensorRT with DEB. I event noticed that the TensorRT has been called as “GIE” before the TensorRT 3.0 released, It change so much as we can’t migrate our .prototxt/.caffemodel file to different platform easy.
We still want to debug the migration problem, so we want to install many TensorRT + CUDA combination to narrow the cause scope, Is it should be easy if we install TensorRT with .tar format?


You can use tar ball method to have multiple TensorRT version on a machine.

Ex. TensorRT2.1:

1. Get CUDA 8.0 installed.

2. Downloaded “TensorRT 2.1 for Ubuntu 16.04 and CUDA 8.0 tar package” from

3. Download “cuDNN v6.0 Library for Linux” from

4. Create “TensorRT2.1” folder and extract above two packages under “TensorRT2.1”

mkdir ~/TensorRT2.1
cd ~/TensorRT2.1
tar xpf TensorRT-2.1.2.x86_64.cuda-8.0-16-04.tar.bz2
tar xpf cudnn-8.0-linux-x64-v6.0.tgz

5. Build sampleFasterRCNN

cd ~/TensorRT2.1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/cuda/lib64:$(pwd)/TensorRT-2.1.2/lib
export CUDNN_INSTALL_PATH=$(pwd)/cuda/
cd TensorRT-2.1.2/samples/sampleFasterRCNN


I checked the /usr/lib/x86_64-linux-gnu directory, and found: link to,, all links to, and final target is

The library can present at the same time in system, but the header and sample files need extract from tar ball. Thanks for AastaLLL advice.