解决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"

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

  • 15
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

锦鲤AI幸运

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值