While trying to install DeepStream I got error related to the TensorRT installation:
The following packages have unmet dependencies:
deepstream-5.1 : Depends: libnvinfer7 (>= 7.2.1) but it is not installable
Depends: libnvinfer-dev (>= 7.2.1) but it is not installable
Depends: libnvparsers7 (>= 7.2.1) but it is not installable
Depends: libnvparsers-dev (>= 7.2.1) but it is not installable
Depends: libnvonnxparsers7 (>= 7.2.1) but it is not installable
Depends: libnvonnxparsers-dev (>= 7.2.1) but it is not installable
Depends: libnvinfer-plugin7 (>= 7.2.1) but it is not installable
Depends: libnvinfer-plugin-dev (>= 7.2.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
version="7.2.1.6"
arch=$(uname -m)
cuda="cuda-11.1"
cudnn="cudnn8.0"
tar -xvzf TensorRT-${version}.Ubuntu-18.04.${arch}-gnu.${cuda}.${cudnn}.tar.gz
echo '# TensorRT' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH="/home/ubuntu/pycharm/libs/TensorRT-'${version}'/lib:${LD_LIBRARY_PATH}"' >> ~/.bashrc
source ~/.bashrc
cd ~/pycharm/libs/TensorRT-${version}/python
python3 -m pip install tensorrt-${version}-cp36-none-linux_x86_64.whl
cd ~/pycharm/libs/TensorRT-${version}/uff
python3 -m pip install uff-0.6.9-py2.py3-none-any.whl
cd ~/pycharm/libs/TensorRT-${version}/graphsurgeon
python3 -m pip install graphsurgeon-0.4.5-py2.py3-none-any.whl
cd ~/pycharm/libs/TensorRT-${version}/onnx_graphsurgeon
python3 -m pip install onnx_graphsurgeon-0.2.6-py2.py3-none-any.whl
TensorRT works correctly from Python. But dpkg -l | grep TensorRT does not show anything. I think all the necessary libraries are in my folder /home/ubuntu/pycharm/libs/TensorRT-7.2.1.6/lib:
I can’t use a container as this is my local machine. I followed the guide for tar archives as you can see from the steps above. I repeated them with no success.
I tried to install TensorRT using the deb package. It seems that the issue is caused by CuDNN:
The following packages have unmet dependencies:
tensorrt : Depends: libnvinfer-dev (= 7.2.1-1+cuda11.1) but 8.2.0-1+cuda11.4 is to be installed
Depends: libnvinfer-plugin-dev (= 7.2.1-1+cuda11.1) but 8.2.0-1+cuda11.4 is to be installed
Depends: libnvparsers-dev (= 7.2.1-1+cuda11.1) but 8.2.0-1+cuda11.4 is to be installed
Depends: libnvonnxparsers-dev (= 7.2.1-1+cuda11.1) but 8.2.0-1+cuda11.4 is to be installed
Depends: libnvinfer-samples (= 7.2.1-1+cuda11.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Why does it tried to install the version for cuda 11.4? nvcc --version reports cuda 11.1. Have they been removed from the repository? If yes, I would need to use the tar installation, but it does not work.
(venv) ubuntu@ip-172-31-3-34:~/pycharm/libs$ sudo apt-get install -y libcudnn8=${cudnn_version}-1+${cuda_version}
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcudnn8 is already the newest version (8.0.5.39-1+cuda11.1).
The following package was automatically installed and is no longer required:
linux-aws-5.4-headers-5.4.0-1056
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
(venv) ubuntu@ip-172-31-3-34:~/pycharm/libs$
(venv) ubuntu@ip-172-31-3-34:~/pycharm/libs$ sudo apt-get install -y libcudnn8-dev=${cudnn_version}-1+${cuda_version}
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcudnn8-dev is already the newest version (8.0.5.39-1+cuda11.1).
The following package was automatically installed and is no longer required:
linux-aws-5.4-headers-5.4.0-1056
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
Looks like you have older version of TRT package but you’re following installation steps of latest.
Please uninstall existing installation by following below
I followed the instruction for the appropriate version but as of now I can’t find a way to properly setup deem stream 5.1 on a clean ubuntu machine using TensorRT 7.2.1.6, CuDNN 8.0 and Cuda 11.1.
I need Deepstream 5.1, I can’t use a newer version.