Intalling TensorRT: Depends: libnvinfer8 (= 8.2.2-1+cuda11.4) but it is not going to be installed
I do have a docker container with the following environment:
- OS: Linux Ubuntu 18.04
- Base Image: pytorch/pytorch:1.9.1-cuda11.1-cudnn8-runtime
- GPU: Tesla K80
- Cuda Version: 11.1
- PyTorch Version: 1.9.1
- downloaded .deb:
nv-tensorrt-repo-ubuntu1804-cuda11.4-trt8.2.2.1-ga-20211214_1-1_amd64.deb
information from the downloaded .deb:
TensorRT 8.2 GA Update 1 for Ubuntu 18.04 and CUDA 11.0, 11.1, 11.2, 11.3, 11.4 and 11.5 DEB local repo Package
As I followed the installing instructions on the Nvidia Webside an error ocurred:
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 : Depends: libnvinfer8 (= 8.2.2-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-plugin8 (= 8.2.2-1+cuda11.4) but it is not going to be installed
Depends: libnvparsers8 (= 8.2.2-1+cuda11.4) but it is not going to be installed
Depends: libnvonnxparsers8 (= 8.2.2-1+cuda11.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I am running into same issue as well. Any fix or suggestions?
Same issue
Same issue...
Install python3-libnvinfer-dev first, then it should work.
sudo apt-get install python3-libnvinfer-dev
Order in Installation guide is mixed up
@laszloturanyi I tried that, but it is not able to locate the package for some odd reason.
apt-get install python3-libnvinfer-dev
into:
E: Unable to locate package python3-libnvinfer-dev
This problem occurs for any other libnv-package too.
I now used the given container from nvidia as workaround:
https://github.com/NVIDIA/TensorRT/tree/main/docker
I am also having the same issues... I have tried this (after downloading and installing the .deb package):
$ sudo apt-get 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: libnvinfer8 (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-plugin8 (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvparsers8 (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvonnxparsers8 (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-bin (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-plugin-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvparsers-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvonnxparsers-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-samples (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-doc (= 8.2.3-1+cuda11.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
A quick search gives me this result:
$ apt-cache search tensorrt
libnvinfer-plugin-dev - TensorRT plugin libraries
libnvinfer-bin - TensorRT binaries
tensorrt - Meta package of TensorRT
libnvinfer-doc - TensorRT documentation
graphsurgeon-tf - GraphSurgeon for TensorRT package
libnvinfer-dev - TensorRT development libraries and headers
onnx-graphsurgeon - ONNX GraphSurgeon for TensorRT package
python3-libnvinfer - Python 3 bindings for TensorRT
libnvparsers-dev - TensorRT parsers libraries
libnvinfer-plugin8 - TensorRT plugin libraries
libnvinfer8 - TensorRT runtime libraries
libnvonnxparsers8 - TensorRT ONNX libraries
uff-converter-tf - UFF converter for TensorRT package
libnvonnxparsers-dev - TensorRT ONNX libraries
libnvinfer-samples - TensorRT samples
python3-libnvinfer-dev - Python 3 development package for TensorRT
libnvparsers8 - TensorRT parsers libraries
nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.1.8-ga-20211117 - nv-tensorrt repository configuration files
I have also tried:
$ 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 (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvinfer-plugin-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvparsers-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
Depends: libnvonnxparsers-dev (= 8.2.3-1+cuda11.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
any updates or fixes for this issue??
I face the same issue and still do not have any solution for it
Found solution here https://forums.developer.nvidia.com/t/tensorrt-8-0-installation/180498/6
the solution is to install cudnn packages through the deb installation, not tar, as described here: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html
same issue too, anyone know how to fix it?
I have bumped to same issue when I installed the cuda + driver from the .run package. It turned out that result of .run installation is NOT same as after .deb repository unpacking: install from .run script does not register cuda packages at all. In result the tensorrt installation does not see necessary cuda packs and fails.
NOTE: It is important to uninstallfiles instelled by .run script correctly else cuda installation from .deb will fail. There are two commands are necessary: sudo /usr/local/cuda-xx.x/bin/./cuda-uninstaller then sudo nvidia-uninstall then reboot then install cuda+driver from a .deb repo
I have bumped to same issue when I installed the cuda + driver from the .run package. It turned out that result of .run installation is NOT same as after .deb repository unpacking: install from .run script does not register cuda packages at all. In result the tensorrt installation does not see necessary cuda packs and fails.
NOTE: It is important to uninstallfiles instelled by .run script correctly else cuda installation from .deb will fail. There are two commands are necessary: sudo /usr/local/cuda-xx.x/bin/./cuda-uninstaller then sudo nvidia-uninstall then reboot then install cuda+driver from a .deb repo
Thanks @iuskov-nablet. I previously installed Cuda with a run file from NVidia's archive and could not get it to work.
Just a quick note to anybody using their archive.
The older versions of cuda are shipped with old nvidia drivers in the archive, which caused an issue for me because I use the 40-series graphics cards.
If you want older cuda versions but with newer drivers, then take a look here.
Once it's setup, then you can install cuda like this:
sudo apt-get install cuda-11-3
For the above command I got nvidia-driver-535 shipped along with cuda11.3 :)
I encountered the same issue and found a solution! I was trying to install tensorrt libs=8.6.0.12-1+cuda11.8 on the nvcr.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 image but ran into error messages indicating unmet dependencies.
root@732029c2cefe:/# apt-get install libnvinfer-bin=8.6.0.12-1+cuda11.8
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:
libnvinfer-bin : Depends: libnvinfer8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-lean8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-plugin8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-vc-plugin8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-dispatch8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvparsers8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvonnxparsers8 (= 8.6.0.12-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
E: Unable to correct problems, you have held broken packages.
To resolve this, I followed a suggestion from an AskUbuntu post, which recommended installing the dependent libraries before attempting to install the desired library. This approach worked, and I was able to successfully install the TensorRT libraries.
root@732029c2cefe:/# apt-get install libnvinfer8=8.6.0.12-1+cuda11.8 libnvinfer-lean8=8.6.0.12-1+cuda11.8 libnvinfer-plugin8=8.6.0.12-1+cuda11.8 libnvinfer-vc-plugin8=8.6.0.12-1+cuda11.8 libnvinfer-dispatch8=8.6.0.12-1+cuda11.8 libnvparsers8=8.6.0.12-1+cuda11.8 libnvonnxparsers8=8.6.0.12-1+cuda11.8
root@732029c2cefe:/# apt-get install libnvinfer8=8.6.0.12-1+cuda11.8 libnvinfer-lean8=8.6.0.12-1+cuda11.8 libnvinfer-plugin8=8.6.0.12-1+cuda11.8 libnvinfer-vc-plugin8=8.6.0.12-1+cuda11.8 libnvinfer-dispatch8=8.6.0.12-1+cuda11.8 libnvparsers8=8.6.0.12-1+cuda11.8 libnvonnxparsers8=8.6.0.12-1+cuda11.8Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
libnvinfer-dispatch8 libnvinfer-lean8 libnvinfer-plugin8 libnvinfer-vc-plugin8 libnvinfer8 libnvonnxparsers8 libnvparsers8
0 upgraded, 7 newly installed, 0 to remove and 64 not upgraded.
Need to get 505 MB of archives.
After this operation, 1308 MB of additional disk space will be used.
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer-dispatch8 8.6.0.12-1+cuda11.8 [212 kB]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer-lean8 8.6.0.12-1+cuda11.8 [8883 kB]
Get:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer8 8.6.0.12-1+cuda11.8 [482 MB]
Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer-plugin8 8.6.0.12-1+cuda11.8 [12.5 MB]
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer-vc-plugin8 8.6.0.12-1+cuda11.8 [240 kB]
Get:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvonnxparsers8 8.6.0.12-1+cuda11.8 [718 kB]
Get:7 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvparsers8 8.6.0.12-1+cuda11.8 [804 kB]
Fetched 505 MB in 21s (23.5 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libnvinfer-dispatch8.
(Reading database ... 14025 files and directories currently installed.)
Preparing to unpack .../0-libnvinfer-dispatch8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer-dispatch8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvinfer-lean8.
Preparing to unpack .../1-libnvinfer-lean8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer-lean8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvinfer8.
Preparing to unpack .../2-libnvinfer8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvinfer-plugin8.
Preparing to unpack .../3-libnvinfer-plugin8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer-plugin8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvinfer-vc-plugin8.
Preparing to unpack .../4-libnvinfer-vc-plugin8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer-vc-plugin8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvonnxparsers8.
Preparing to unpack .../5-libnvonnxparsers8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvonnxparsers8 (8.6.0.12-1+cuda11.8) ...
Selecting previously unselected package libnvparsers8.
Preparing to unpack .../6-libnvparsers8_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvparsers8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer-lean8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer-vc-plugin8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer-dispatch8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvparsers8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer-plugin8 (8.6.0.12-1+cuda11.8) ...
Setting up libnvonnxparsers8 (8.6.0.12-1+cuda11.8) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
After first downloading unmet dependencies
root@732029c2cefe:/# apt-get install libnvinfer-bin=8.6.0.12-1+cuda11.8
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
libnvinfer-bin
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
Need to get 354 kB of archives.
After this operation, 1533 kB of additional disk space will be used.
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 libnvinfer-bin 8.6.0.12-1+cuda11.8 [354 kB]
Fetched 354 kB in 0s (1112 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libnvinfer-bin.
(Reading database ... 14065 files and directories currently installed.)
Preparing to unpack .../libnvinfer-bin_8.6.0.12-1+cuda11.8_amd64.deb ...
Unpacking libnvinfer-bin (8.6.0.12-1+cuda11.8) ...
Setting up libnvinfer-bin (8.6.0.12-1+cuda11.8) ...
After so much hours of suffering, I found a link for nvidia libs database, with all libs for version 8
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/
经过这么多小时的痛苦,我找到了一个 nvidia libs 数据库的链接,其中包含版本 8 的所有 libs
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/
thanks for this url, it is useful. add this url to apt, then apt --fix-broken install