You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Ubuntu 20.04 LTS中ubuntu-advantage-tools与ubuntu-pro-client依赖冲突致更新失败且无法卸载的解决求助

Ubuntu 20.04 LTS中ubuntu-advantage-tools与ubuntu-pro-client依赖冲突致更新失败且无法卸载的解决求助

大家好,我在Ubuntu 20.04 LTS上不小心点了软件更新器里的推广按钮,结果ubuntu-pro安装失败了。现在想修复这个问题,却碰到了ubuntu-advantage-tools和ubuntu-pro-client之间的依赖冲突,试了好几种办法都没搞定,想问问有没有人遇到过同样的情况,有没有简单的修复方案?另外aptitude跑了好几个小时之后就卡住了,完全没进展。

现在ubuntu-advantage-tools还没法直接卸载,直接把修复的路给堵死了。

下面是我尝试的命令和对应的报错信息:

~$ sudo apt-get upgrade
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:
 ubuntu-advantage-tools : Depends: ubuntu-pro-client (>= 31.2~20.04) but it is not installed
 ubuntu-pro-client-l10n : Depends: ubuntu-pro-client (= 31.2~20.04) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  ubuntu-pro-client
The following NEW packages will be installed:
  ubuntu-pro-client
0 upgraded, 1 newly installed, 0 to remove and 55 not upgraded.
2 not fully installed or removed.
Need to get 0 B/196 kB of archives.
After this operation, 1,116 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 413409 files and directories currently installed.)
Preparing to unpack .../ubuntu-pro-client_31.2~20.04_amd64.deb ...
Unpacking ubuntu-pro-client (31.2~20.04) ...
dpkg: error processing archive /var/cache/apt/archives/ubuntu-pro-client_31.2~20.04_amd64.deb (--unpack):
 trying to overwrite '/etc/apt/apt.conf.d/20apt-esm-hook.conf', which is also in package ubuntu-advantage-tools 31.2~20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/ubuntu-pro-client_31.2~20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

$ sudo dpkg -P ubuntu-advantage-tools
dpkg: dependency problems prevent removal of ubuntu-advantage-tools:
 update-manager-core depends on ubuntu-advantage-tools.
 ubuntu-minimal depends on ubuntu-advantage-tools.
 ubuntu-advantage-desktop-daemon depends on ubuntu-advantage-tools.
 software-properties-gtk depends on ubuntu-advantage-tools (>= 27.11~).

dpkg: error processing package ubuntu-advantage-tools (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 ubuntu-advantage-tools

备注:内容来源于stack exchange,提问作者Toby B

火山引擎 最新活动