解决apt-get安装一些依赖包版本冲突问题,You might want to run ‘apt --fix-broken install‘ to correct these!

遇见报错及其日志

省流直接输入(作者这边是解决了的,附上项目跑通的结尾的成功截图!):

sudo apt --fix-broken install -o Dpkg::Options::="--force-overwrite"

起因是作者在玩NVIDIA Jetson系列开发板时,导入mmdetection所需要的依赖libopenblas-dev

sudo apt-get autoremove libopenblas-dev

报错日志如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-libraries-dev-11-4 : Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not 	going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
(wjlaction2) ai@ubuntu:~/workspace/wjl_work$ sudo apt install libopenblas-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libopenblas-dev is already the newest version (0.3.8+ds-1ubuntu0.20.04.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-libraries-dev-11-4 : Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

那么系统建议我们输入apt --fix-broken install看看能否解决。
输入apt --fix-broken install后,还是报错,日志如下:

Transaction failed: The package system is broken
The following packages have unmet dependencies:

cuda-libraries-dev-11-4: Depends: cuda-cudart-dev-11-4 (>= 11.4.243) but 11.4.243-1 is installed
Depends: cuda-cccl-11-4 (>= 11.4.222) but 11.4.222-1 is installed
Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not installed
Depends: cuda-driver-dev-11-4 (>= 11.4.243) but 11.4.243-1 is installed
Depends: libcudla-dev-11-4 (>= 11.4.239) but 11.4.239-1 is installed

系统大致给我们反馈了,很多包版本冲突,无法安装

解决方案

输入指令:

sudo apt --fix-broken install -o Dpkg::Options::="--force-overwrite"

解决apt-get安装一些依赖包版本冲突问题,You might want to run ‘apt --fix-broken install‘ to correct these!_第1张图片
成功推理出视频结果,截图展示:
在这里插入图片描述

你可能感兴趣的:(NVIDIA,Jetson环境搭建,神经网络模型部署,Jetson部署,mmdetection)