TensorRT deb安装方式踩坑“ tensorrt : Depends: libnvinfer8 (= 8.0.1-1+cuda11.3) but it is not going to be ”

在Ubuntu18.04系统中,安装TensorRT时出现错误,提示依赖的CUDA库版本不匹配。解决方案包括从官方网站下载对应CUDA版本的TensorRT,或者重新安装CUDA,采用.deb包进行安装。在卸载并重新安装CUDA过程中,可能需要重新安装Nvidia显卡驱动以恢复`nvidia-smi`命令的功能。
摘要由CSDN通过智能技术生成

系统: Ubuntu 18.04

报错如下:

tensorrt : Depends: libnvinfer8 (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvinfer-plugin8 (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvparsers8 (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvonnxparsers8 (= 8.0.1-1+cuda11.3 but it is not going to be installed
            Depends: libnvinfer-bin (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvinfer-dev (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvinfer-plugin-dev (=8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvparsers-dev (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvonnxparsers-dev (= 8 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvinfer-samples (= 8.0.1-1+cuda11.3) but it is not going to be installed
            Depends: libnvinfer-doc (= 8.0.1-1+cuda11.3) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

报错原因1: TensorRT版本与cuda版本不对应

解决方法:去官网重新下对应电脑cuda的TensorRT版本;

报错原因2: 之前采用的runfile方式安装的cuda,即使版本对应正确,安装TensorRT时也会报上面的错

解决方法:重新安装cuda,采用.deb的方式安装,

先卸载已安装的cuda,参考Ubuntu18.04完全卸载CUDA_ubuntu卸载cuda_谱写的博客-CSDN博客

重新安装cuda,可参考【非常详细】Ubuntu18.04安装显卡驱动和CUDA,CUDNN流程和踩坑记录_ubuntu18.04安装cuda_�Sintol·D·Kevin的博客-CSDN博客

重装完cuda后,nvidia-smi命令可能会失效,此时还需要重装下Nvidia显卡驱动。

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值