Unable to install older TensorRT versions using NVIDIA CUDA APT repository

Description

Unable to install older TensorRT versions using the NVIDIA CUDA APT repository.

When installing the tensorrt=8.5.1.7-1+cuda11.8 package, apt-get fails with the following.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tensorrt : Depends: libnvinfer8 (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvinfer-plugin8 (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvparsers8 (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvonnxparsers8 (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvinfer-bin (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvinfer-dev (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvinfer-plugin-dev (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvparsers-dev (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvonnxparsers-dev (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
            Depends: libnvinfer-samples (= 8.5.1-1+cuda11.8) but 8.5.3-1+cuda11.8 is to be installed
E: Unable to correct problems, you have held broken packages.

This is a new installation of 22.04 with no previous CUDA packages installed. According to dpkg -l, there are no held or broken packages.

It is desired to use this installation in a script to setup the appropriate environment for developers. Access to the TensorRT tar archive or local deb repository is not permitted unless you are logged in, which makes it difficult to use that method.

Environment

TensorRT Version: 8.5.1.7
GPU Type: 4090
Nvidia Driver Version: 525.78.01
CUDA Version: 11.8
CUDNN Version: 8.6.0.163
Operating System + Version: Ubuntu 22.04
Python Version (if applicable): N/A
TensorFlow Version (if applicable): N/A
PyTorch Version (if applicable): N/A
Baremetal or Container (if container which image + tag): Baremetal

Relevant Files

Steps To Reproduce

  1. Configure the CUDA repository by installing https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb

  2. Install CUDA toolkit 11.8 and cuDNN 8.6.0:

    sudo apt-get install cuda-toolkit-11-8 libcudnn8=8.6.0.163-1+cuda11.8

  3. Install TensorRT 8.5.1.7

    sudo apt-get install tensorrt=8.5.1.7-1+cuda11.8

Hi,
Please refer to the installation steps from the below link if in case you are missing on anything

Also, we suggest you to use TRT NGC containers to avoid any system dependency related issues.

Thanks!

I’ve read those documents and there doesn’t seem to be anything other than suggesting the packages are held after they are installed. The problem is that it can’t be installed to begin with.

If it helps, here is a Dockerfile that can be used to reproduce this issue in a clean environment:

FROM ubuntu:jammy

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl && \
    curl -fsSLO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb && \
    dpkg -i cuda-keyring_1.0-1_all.deb && \
    rm cuda-keyring_1.0-1_all.deb && \
    rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --no-install-recommends cuda-toolkit-11-8 libcudnn8=8.6.0.163-1+cuda11.8 && rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --no-install-recommends tensorrt=8.5.1.7-1+cuda11.8 && rm -rf /var/lib/apt/lists/*

@hyoo_dv.

This is because apt always tries to install the latest version.
Maybe Nvidia will fix the packages dependencies declaration one day but while we wait: It works if you specify all dependencies versions manually.

Ex :

apt install -y tensorrt=8.5.2.2-1+cuda11.8 \
                libnvinfer8=8.5.2-1+cuda11.8 \
                libnvinfer-plugin8=8.5.2-1+cuda11.8 \
                libnvparsers8=8.0.1-1+cuda10.2 \
                libnvonnxparsers8=8.0.1-1+cuda10.2 \
                libnvinfer-bin=8.5.2-1+cuda11.8 \
                libnvinfer-dev=8.5.2-1+cuda11.8 \
                libnvinfer-plugin-dev=8.5.2-1+cuda11.8 \
                libnvparsers-dev=8.5.2-1+cuda11.8 \
                libnvonnxparsers-dev=8.5.2-1+cuda11.8 \
                libnvinfer-samples=8.5.2-1+cuda11.8

All credits goes to Jesus Alvarez: Unmet dependencies issue when installing TensorRT from a cuda:10.2-cudnn7-devel-ubuntu18.04 (#75) · Issues · nvidia / container-images / cuda · GitLab

1 Like