I have a meta-package for tensorrt
which is just a list of dependencies to specific versions of libraries. Here is the control
file of it:
Package: tensorrt
Source: tensorrt (7.1.3-1+cuda10.2)
Version: 7.1.3.4-1+cuda10.2
Architecture: amd64
Maintainer: cudatools <[email protected]>
Installed-Size: 11
Depends: libnvinfer7 (= 7.1.3-1+cuda10.2), libnvinfer-plugin7 (= 7.1.3-1+cuda10.2), libnvparsers7 (= 7.1.3-1+cuda10.2), libnvonnxparsers7 (= 7.1.3-1+cuda10.2), libnvinfer-bin (= 7.1.3-1+cud
a10.2), libnvinfer-dev (= 7.1.3-1+cuda10.2), libnvinfer-plugin-dev (= 7.1.3-1+cuda10.2), libnvparsers-dev (= 7.1.3-1+cuda10.2), libnvonnxparsers-dev (= 7.1.3-1+cuda10.2), libnvinfer-samples
(= 7.1.3-1+cuda10.2), libnvinfer-doc (= 7.1.3-1+cuda10.2)
Section: multiverse/devel
Priority: optional
Description: Meta package of TensorRT
Meta package of TensorRT.
Now, when I want to install tensorrt
it says:
The following packages have unmet dependencies:
tensorrt : Depends: libnvinfer-dev (= 7.1.3-1+cuda10.2) but 8.0.3-1+cuda11.3 is to be installed
Depends: libnvinfer-plugin-dev (= 7.1.3-1+cuda10.2) but 8.0.3-1+cuda11.3 is to be installed
Depends: libnvparsers-dev (= 7.1.3-1+cuda10.2) but 8.0.3-1+cuda11.3 is to be installed
Depends: libnvonnxparsers-dev (= 7.1.3-1+cuda10.2) but 8.0.3-1+cuda11.3 is to be installed
Depends: libnvinfer-samples (= 7.1.3-1+cuda10.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
If we take a specific lib, for example libnvinfer-dev
, according to apt-cache policy
, I have several versions of it available:
(ubuntu-xenial-amd64)svc_moma_usr@PL1LXD-529389:/$ apt-cache policy libnvinfer-dev
libnvinfer-dev:
Installed: 7.1.3-1+cuda10.2
Candidate: 8.0.3-1+cuda11.3
Version table:
8.0.3-1+cuda11.3 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.3-1+cuda10.2 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.1-1+cuda11.3 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.1-1+cuda10.2 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.0-1+cuda11.3 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.0-1+cuda11.0 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
8.0.0-1+cuda10.2 500
500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
*** 7.1.3-1+cuda10.2 500
500 https://repository.ttgroup.com/repository/rozbad-xenial xenial/main amd64 Packages
100 /var/lib/dpkg/status
7.0.0-1+cuda10.2 500
500 file:/var/nv-tensorrt-repo-cuda10.2-trt7.0.0.11-ga-20191216 Packages
500 https://repository.ttgroup.com/repository/rozbad-xenial xenial/main amd64 Packages
As you can see, I managed to install the version I want explicitly with apt install libnvinfer-dev=7.1.3-1+cuda-10.2
, even though the version is older, but installing this version is not possible through tensorrt
meta-package, although the older versions are also explicitely stated there. How can I make APT install this package?
I know that it is possible to change the priorities in /etc/apt/preferences.d
, but this is done on the system level, while I want to tell APT to install these packages through the control
file.