dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.15 is to be installed

输入命令:
sudo apt-get install aptitude时 报下面的错误:

The following packages have unmet dependencies:
 dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.15 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

解决过程:我使用的linux 的CodeName 是groovy 

philip@philip-virtual-machine:~$ lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.10
Release:	20.10
Codename:	groovy


在下面的源中都不含有groovy的CodeName 源:
https://mirrors.aliyun.com/ubuntu/dists
https://mirrors.huaweicloud.com/ubuntu/dists
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists
使用这些源中的groovy时直接报错"Not Found",因为这些源中都不含有groovy

在https://mirrors.163.com/ubuntu/dists中的groovy就是一个空壳。一开始使用了163中的groovy。然而在sudo apt-get update就失败了,同样报错“Not Found”。换了163中的bionic源,update就能成功。然而安装 aptitude时,依然报错,查了好久无意看到有人建议使用focal源,然后“sudo apt-get install aptitude”就成功了。最后用了mirrors.aliyun.com 中的focal源。

在sudo apt-get upgrade时还碰到另外一个错误: distro-info-data : Breaks: distro-info (< 0.20~) but 0.18ubuntu0.18.04.1 is to be installed

The following packages have unmet dependencies:
 distro-info-data : Breaks: distro-info (< 0.20~) but 0.18ubuntu0.18.04.1 is to be installed
 dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.14 is to be installed
E: Broken packages

通过这个命令解决:sudo apt remove ubuntu-advantage-tools
apt upgrade have unmet dependencies - openthings的个人空间 - OSCHINA - 中文开源技术交流社区

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值