安装tensorRT时候报错,未成功安装依赖:
tensorrt : Depends: libnvinfer7 (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-plugin7 (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvparsers7 (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvonnxparsers7 (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-bin (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-dev (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-plugin-dev (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvparsers-dev (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvonnxparsers-dev (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-samples (= 7.2.3-1+cuda11.1) but it is not going to be installed
Depends: libnvinfer-doc (= 7.2.3-1+cuda11.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
先安装aptitude:
sudo apt-get install aptitude
再用aptitude命令代替apt-get命令:
sudo aptitude install tensorRT
该命令可自动解决依赖问题