首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >apt升级错误:以下软件包有未满足的依赖关系:

apt升级错误:以下软件包有未满足的依赖关系:
EN

Stack Overflow用户
提问于 2022-05-20 23:08:52
回答 2查看 1.3K关注 0票数 0

我试图做一个apt更新apt升级,但我有一个错误。

终端误差

以下软件包有未满足的依赖关系: dpkg :突破口: libapt-pkg5.0 (< 1.7~b),但1.6.14要安装E:坏包。

我已经尝试了很多东西,如清洁,自动清洁,dpkg -配置-a.但什么也帮不了我。

谢谢,问候。

EN

回答 2

Stack Overflow用户

发布于 2022-07-05 10:52:46

在我的组织中,使用以下顺序解决了此错误:

代码语言:javascript
复制
# apt remove ubuntu-advantage-tools
# apt install -f
# apt update
# apt upgrade

这些步骤之后的重新启动应该完成更新。

产出如下:

代码语言:javascript
复制
root@host:~# **apt remove ubuntu-advantage-tools**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  distro-info
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  ubuntu-advantage-tools ubuntu-minimal ubuntu-server update-manager-core update-notifier-common
0 upgraded, 0 newly installed, 5 to remove and 9 not upgraded.
After this operation, 4812 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 94121 files and directories currently installed.)
Removing ubuntu-server (1.450.2) ...
Removing update-notifier-common (3.192.30.10) ...
Removing update-manager-core (1:20.04.10.10) ...
dpkg: warning: while removing update-manager-core, directory '/var/lib/update-manager' not empty so not removed
Removing ubuntu-minimal (1.450.2) ...
Removing ubuntu-advantage-tools (27.8~20.04.1) ...
Processing triggers for man-db (2.9.1-1) ...


root@host:~# **apt install -f**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  distro-info
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
 
 
root@host:~# **apt update**
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 https://download.docker.com/linux/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
 

root@host:~# **apt upgrade**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  distro-info
Use 'apt autoremove' to remove it.
The following packages will be upgraded:
  ca-certificates cloud-init containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin
  intel-microcode snapd
9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 145 MB of archives.
After this operation, 5364 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 ca-certificates all 20211016~18.04.1 [144 kB]
Get:2 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.6.6-1 [28.1 MB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 snapd amd64 2.55.5+18.04 [35.6 MB]
Get:4 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-cli amd64 5:20.10.17~3-0~ubuntu-focal [40.6 MB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cloud-init all 22.2-0ubuntu1~18.04.3 [493 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 intel-microcode amd64 3.20220510.0ubuntu0.18.04.1 [4063 kB]
Get:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:20.10.17~3-0~ubuntu-focal [21.0 MB]
Get:8 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:20.10.17~3-0~ubuntu-focal [8171 kB]
Get:9 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-compose-plugin amd64 2.6.0~ubuntu-focal [6560 kB]
Fetched 145 MB in 4s (36.3 MB/s)                
Preconfiguring packages ...
(Reading database ... 93863 files and directories currently installed.)
Preparing to unpack .../0-ca-certificates_20211016~18.04.1_all.deb ...
Unpacking ca-certificates (20211016~18.04.1) over (20210119~20.04.2) ...
Preparing to unpack .../1-containerd.io_1.6.6-1_amd64.deb ...
Unpacking containerd.io (1.6.6-1) over (1.6.4-1) ...
Preparing to unpack .../2-docker-ce-cli_5%3a20.10.17~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce-cli (5:20.10.17~3-0~ubuntu-focal) over (5:20.10.16~3-0~ubuntu-focal) ...
Preparing to unpack .../3-docker-ce_5%3a20.10.17~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce (5:20.10.17~3-0~ubuntu-focal) over (5:20.10.16~3-0~ubuntu-focal) ...
Preparing to unpack .../4-docker-ce-rootless-extras_5%3a20.10.17~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce-rootless-extras (5:20.10.17~3-0~ubuntu-focal) over (5:20.10.16~3-0~ubuntu-focal) ...
Preparing to unpack .../5-docker-compose-plugin_2.6.0~ubuntu-focal_amd64.deb ...
Unpacking docker-compose-plugin (2.6.0~ubuntu-focal) over (2.5.0~ubuntu-focal) ...
Preparing to unpack .../6-snapd_2.55.5+18.04_amd64.deb ...
Unpacking snapd (2.55.5+18.04) over (2.54.3+20.04.1ubuntu0.3) ...
Preparing to unpack .../7-cloud-init_22.2-0ubuntu1~18.04.3_all.deb ...
Unpacking cloud-init (22.2-0ubuntu1~18.04.3) over (22.1-14-g2e17a0d6-0ubuntu1~20.04.3) ...
Preparing to unpack .../8-intel-microcode_3.20220510.0ubuntu0.18.04.1_amd64.deb ...
Unpacking intel-microcode (3.20220510.0ubuntu0.18.04.1) over (3.20210608.0ubuntu0.20.04.1) ...
Setting up cloud-init (22.2-0ubuntu1~18.04.3) ...
Installing new version of config file /etc/cloud/cloud.cfg ...
Setting up intel-microcode (3.20220510.0ubuntu0.18.04.1) ...
update-initramfs: deferring update (trigger activated)
intel-microcode: microcode will be updated at next boot
Setting up ca-certificates (20211016~18.04.1) ...
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
7 added, 8 removed; done.
Setting up containerd.io (1.6.6-1) ...
Setting up docker-compose-plugin (2.6.0~ubuntu-focal) ...
Setting up docker-ce-cli (5:20.10.17~3-0~ubuntu-focal) ...
Setting up docker-ce-rootless-extras (5:20.10.17~3-0~ubuntu-focal) ...
Setting up snapd (2.55.5+18.04) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Setting up docker-ce (5:20.10.17~3-0~ubuntu-focal) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-110-generic
Processing triggers for ca-certificates (20211016~18.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
票数 2
EN

Stack Overflow用户

发布于 2022-07-13 07:28:48

当apt说依赖关系有相互冲突的版本时,您需要手动指定命令行中的所有依赖项。这告诉apt您还想升级所有依赖项。Apt在默认情况下不允许降级软件包。如果任何包仍然有冲突,而且其他已安装的包不需要它,则将自动建议删除它。

版本冲突可能是由于两个存储库具有相同的包,但版本号不同,或者在存储库元数据仍在更新时试图升级包造成的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72325500

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档