当前位置:网站首页>dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.15 is to be installedE: Broken packages
dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.15 is to be installedE: Broken packages
2022-07-20 15:41:00 【无水先生】
一、操作和错误发现
在sudo apt update ;sudo apt upgrade时,出现错误提示:
dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.6.15 is to be installed
E: Broken packages
二、错误分析1
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
[email protected]:~$ 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
比如《阿里》的 https://mirrors.aliyun.com/ubuntu/dists的源如下:
Parent directory/ | - | - |
bionic/ | - | 2018-04-27 07:38 |
bionic-backports/ | - | 2022-07-19 18:43 |
bionic-proposed/ | - | 2022-07-19 19:13 |
bionic-security/ | - | 2022-07-19 18:42 |
bionic-updates/ | - | 2022-07-19 18:43 |
devel/ | - | 2022-04-26 18:24 |
devel-backports/ | - | 2022-04-26 18:24 |
devel-proposed/ | - | 2022-04-26 18:24 |
devel-security/ | - | 2022-04-26 18:24 |
devel-updates/ | - | 2022-04-26 18:24 |
focal/ | - | 2020-04-24 01:34 |
focal-backports/ | - | 2022-07-19 18:40 |
focal-proposed/ | - | 2022-07-19 18:40 |
focal-security/ | - | 2022-07-19 18:39 |
focal-updates/ | - | 2022-07-19 18:40 |
hirsute/ | - | 2021-04-23 00:34 |
hirsute-backports/ | - | 2022-01-21 06:46 |
hirsute-proposed/ | - | 2022-07-19 19:35 |
hirsute-security/ | - | 2022-01-27 07:26 |
hirsute-updates/ | - | 2022-01-27 07:26 |
impish/ | - | 2021-10-15 00:35 |
impish-backports/ | - | 2022-07-16 04:21 |
impish-proposed/ | - | 2022-07-19 19:35 |
impish-security/ | - | 2022-07-17 16:43 |
impish-updates/ | - | 2022-07-17 16:43 |
jammy/ | - | 2022-04-22 01:16 |
jammy-backports/ | - | 2022-07-19 18:38 |
jammy-proposed/ | - | 2022-07-19 19:35 |
jammy-security/ | - | 2022-07-19 18:37 |
jammy-updates/ | - | 2022-07-19 18:37 |
kinetic/ | - | 2022-07-19 19:34 |
kinetic-backports/ | - | 2022-05-03 05:10 |
kinetic-proposed/ | - | 2022-07-19 19:35 |
kinetic-security/ | - | 2022-05-03 06:06 |
kinetic-updates/ | - | 2022-05-03 06:06 |
trusty/ | - | 2015-10-07 19:44 |
trusty-backports/ | - | 2017-12-15 17:49 |
trusty-proposed/ | - | 2020-06-06 14:57 |
trusty-security/ | - | 2020-05-29 16:06 |
trusty-updates/ | - | 2020-05-29 16:08 |
xenial/ | - | 2016-04-21 15:43 |
xenial-backports/ | - | 2022-07-19 18:45 |
xenial-proposed/ | - | 2022-07-04 16:49 |
xenial-security/ | - | 2022-07-19 18:44 |
xenial-updates/ |
这样,你能知道,你的ubuntu是否在该镜像中被支持, 上面的groovy就没有支持。
使用这些源中的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源。所以,在预先下载Ubuntu的时候,就需要考虑源是否被支持。
二、另一个错误
还是因为以上原因,可能将老版Ubuntu的组件安装进来,在sudo apt-get upgrade时, 碰到另外一个错误,如下:
(base) [email protected]:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
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
然后就可以了。
边栏推荐
- Introduction and learning of Jason
- Example of unity custom attribute
- 自注意力和 CNN 的结合 ACmix : On the Integration of Self-Attention and Convolution
- 阿里云Web应用防火墙与CDN如何配置
- 1.8寸TFT LCD128X160 ST7735S SPI串口屏驱动示例
- 2.负载测试
- codeforces round #797 ABCDEFG
- Semantic segmentation -rethinking bisenet for real time semantic segmentation-1-cityscapes dataset
- 宏创建内联函数读写cpu reg
- C语言程序环境和预处理
猜你喜欢
一篇文章快速复习flex属性与用法
2022 new third-party pagoda panel btcloud PHP source code
在 Excel 内使用 ODBC 消费 SAP ABAP CDS view
flask初体验
李宏毅《机器学习》丨4. Deep Learning(深度学习)
[vs2019] create C project
[论文速度] 同时解决成像时,曝光不足和曝光过度问题:Deep Reciprocating HDR Transformation
LeetCode 1260.二维网格迁移:两种方法解决(k次模拟/一步到位)
ModuleNotFoundError_No_module_named通俗的解释和方法
记 - flink sql upset-kafka sink 数据乱序排查与解决思路【业务数据任意修改】
随机推荐
Hide & seek introduction -- end-to-end simulation and processing of radio observation data (I)
HIDE & SEEK 介绍 -- 端到端的模拟和处理无线电观测数据(一)
同时实现射频干扰信号检查与缓解的工作
2022牛客暑假多校第一场ADJI
文件映射(mmap)和sendfile和零copy之间的联系和区别
Kalman Filter 遇到 Deep Learning : 卡尔曼滤波和深度学习有关的论文
七月集训(第20天) —— 二叉搜索树
Machine learning - detailed derivation of support vector machine theory (including explanation of examples) (II)
Relation et différence entre la cartographie des fichiers (mmap) et sendfile et zéro copie
有序矩阵中的第 k 个最小数组和
Machine learning - detailed derivation of support vector machine theory (including explanation of examples) (III)
flask初体验
ON-LSTM介绍
PMP practice once a day | don't get lost in the exam -7.20
The seemingly simple input box input is abnormally stuck. Remember a troubleshooting idea for daily performance problems
@ModelAttribute运用详解
Macro create inline function read / write CPU reg
Example of unity custom attribute
3.压力测试
同步复位异步释放