I was trying to install tensorRT 7.0 in ubuntu 18.4 (nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.0.0.11-ga-20191216_1-1_amd64.deb) debian.
Followed the documentation https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-debian.
I am getting the below error with libnvinfer7. Searching for this around the planet, unable to find, lost my time and sleep. Kindly help me out with this:
amarnath@amarnath-Precision-T3610:/opt/pixuate$ sudo apt install tensorrt
Reading package lists... Done
Building dependency tree
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: libnvinfer7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-plugin7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvparsers7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvonnxparsers7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-bin (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-plugin-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvonnxparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-samples (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-doc (= 7.0.0-1+cuda10.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Well, tried “sudo apt-get install python3-libnvinfer-dev”
amarnath@amarnath-Precision-T3610:/opt/pixuate$ sudo apt-get install python3-libnvinfer-dev
Reading package lists... Done
Building dependency tree
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:
python3-libnvinfer-dev : Depends: python3-libnvinfer (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvinfer-plugin-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
Depends: libnvonnxparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
2
Answers
In the TensorRT installation section from https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html there is this sentence:
If you install the CUDA toolkit and cuDNN using deb files the unmet dependencies error should be resolved.
NOTE: Before installing check the versions of Ubuntu, CUDA and cuDNN you want to install. In the installation tips below CUDA 10.2 and cuDNN 7.6.5 were used. This is tested for TensorRT 7.0.0.
CUDA .deb install
CUDNN .deb install
First download the .deb files:
After that install the downloaded packages:
NOTE: These installation instructions are from the official nvidia web sites
By default, the system will try to upgrade the libnvinfer versions to the most latest ones (including upgrading CUDA to version 11.x).
So we first need to install the necessary versions and then place a hold on them to restrict any automatic upgrade attempts that may cause unmet dependencies.
After that you can install tensorrt without any problems: