卡在“sudo apt upgrade”处,无法克服“E:未满足的依赖关系。尝试不使用任何软件包的“apt --fix-broken install”(或指定解决方案)。”

卡在“sudo apt upgrade”处,无法克服“E:未满足的依赖关系。尝试不使用任何软件包的“apt --fix-broken install”(或指定解决方案)。”

我使用 Ubuntu 22.04.1 LTS。但是,尝试sudo apt install ukui-desktop-environment安装后没有成功。遗憾的是,这样做sudo apt upgrade也不起作用。我收到以下消息。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 ukui-control-center : Depends: kylin-nm (>= 3.1.1-2021+1029.1) but it is not installed
                       Depends: ukui-media (>= 3.0.0-64) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我尝试了许多其他选项,包括以下各种选项。

sudo apt install -f
sudo apt remove --purge ukui-desktop-environment
sudo dpkg --configure --force-overwrite -a
sudo dpkg --configure -a
sudo apt dist-upgrade -y

什么都没起作用。我几乎被困住了:

The following packages have unmet dependencies:
 ukui-control-center : Depends: kylin-nm (>= 3.1.1-2021+1029.1) but it is not installed
                       Depends: ukui-media (>= 3.0.0-64) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

说实话,现在我不再需要新软件包了。我只想恢复到原来的状态。我怎样才能撤消所有操作并恢复原来的 ubuntu?

答案1

我设法解决了这个问题。

  1. 我从应用程序中删除了 ppas Software & Updates > Other Software
  2. sudo apt update
  3. sudo apt upgrade
  4. 然后逐一清除所有残留物。
  5. 结束一切sudo apt autoremove

相关内容