当前位置:   article > 正文

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

you might want to run 'apt --fix-broken install' to correct these.

遇见报错及其日志

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

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

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

sudo apt-get autoremove libopenblas-dev
  • 1

报错日志如下:

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).
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

那么系统建议我们输入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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

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

解决方案

输入指令:

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

在这里插入图片描述
成功推理出视频结果,截图展示:
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/129855
推荐阅读
相关标签
  

闽ICP备14008679号