输入命令:
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 - 中文开源技术交流社区