Can not get the TensorRT-7.2.2.3 Example to compile

I have installed the CUDA-11.2 with GPU Driver 460.

Also I have downloaded this TensorRT-7.2.2.3 package into my local along with the cudnn:

tried both: cudnn-10.2-linux-x64-v7.6.5.32.tgz or libcudnn8_8.1.0.77-1+cuda11.2_amd64.deb

But I try to compile the TensorRT-7.2.2.3/samples/sampleMNIST example test, I got following error.

I seems that I got the compatibility issue between CUDA-11 / TensorRT /cudnn

When I use the CUDA-10.2 with TensorRT-7.0, Everything works well.

Could you please advise how t fix that problem?

Thanks
Jimmy

Install CUDA and GPU Driver command

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda-repo-ubuntu1804-11-2-local_11.2.1-460.32.03-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-11-2-local_11.2.1-460.32.03-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu1804-11-2-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
sudo apt-get remove nvidia-driver*
sudo apt-get install nvidia-driver-460

Error mesage after make

/usr/bin/ld: warning: libnvrtc.so.11.1, needed by …/…/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
…/…/lib/libnvinfer.so: undefined reference to nvrtcDestroyProgram@libnvrtc.so.11.1' ../../lib/libmyelin.so: undefined reference to nvrtcAddNameExpression@libnvrtc.so.11.1’
…/…/lib/libnvinfer.so: undefined reference to nvrtcCreateProgram@libnvrtc.so.11.1' ../../lib/libnvinfer.so: undefined reference to nvrtcCompileProgram@libnvrtc.so.11.1’
…/…/lib/libnvinfer.so: undefined reference to nvrtcGetPTX@libnvrtc.so.11.1' ../../lib/libnvinfer.so: undefined reference to nvrtcVersion@libnvrtc.so.11.1’
…/…/lib/libnvinfer.so: undefined reference to nvrtcGetProgramLog@libnvrtc.so.11.1' ../../lib/libmyelin.so: undefined reference to nvrtcGetLoweredName@libnvrtc.so.11.1’
…/…/lib/libnvinfer.so: undefined reference to nvrtcGetErrorString@libnvrtc.so.11.1' ../../lib/libnvinfer.so: undefined reference to nvrtcGetProgramLogSize@libnvrtc.so.11.1’
…/…/lib/libnvinfer.so: undefined reference to `nvrtcGetPTXSize@libnvrtc.so.11.1’
collect2: error: ld returned 1 exit status
…/Makefile.config:300: recipe for target ‘…/…/bin/sample_mnist_debug’ failed
make: *** […/…/bin/sample_mnist_debug] Error 1

Never mind. After I installed the CUDA-11.1, now it works.