无法 sudo apt-get install ubuntu-desktop --reinstall

无法 sudo apt-get install ubuntu-desktop --reinstall

我安装了一些软件包,要查看已安装软件包的列表,请参见这里我离开办公桌,锁上电脑,屏幕恢复黑屏,然后才登录。

我搜索了谷歌,发现告诉我重新启动服务,所以我运行sudo service lightdm --full-restart它打开我的登录屏幕,输入我的密码,然后登录到一个黑屏,上面有一个 Komodo 图标和我的鼠标光标。所以我又搜索了一下,发现。我尝试了这两种方法,但都没有任何效果。

所以我假设我必须重新安装 Ubuntu 桌面,或者从备份运行。运行时我遇到的唯一问题sudo apt-get install ubuntu-desktop --reinstallunable to correct problems, you have held broken packages

The following packages have unmet dependencies:
  ubuntu-desktop : Depends: software-center but it is not going to be installed
                   Depends: ubuntu-sso-client but it is not going to be installed
                   Depends: unity but it is not going to be installed
                   Recommends: bluez-alsa but it is not going to be installed
                   Recommends: empathy but it is not going to be installed
                   Recommends: firefox but it is not going to be installed
                   Recommends: gnome-disk-utility but it is not going to be installed
                   Recommends: gnome-orca but it is not going to be installed
                   Recommends: landscape-client-ui-install but it is not going to be installed
                   Recommends: pulse-audio-module-x11 but it is not going to be installed
                   Recommends: python3-aptdaemon.pkcompat but it is not going to be installed
                   Recommends: totem-mozilla but it is not going to be installed
                   Recommends: ttf-punjabi-fonts but it is not going to be installed
                   Recommends: vino but it is not going to be installed
E: Unable to correct problems, you have held broken packages

这些听起来都很重要,而且好像应该已经安装了,所以我的问题很简单,我现在到底该怎么做?我该如何成功解决这个问题?

答案1

首先通过 清除缓存sudo apt-get autoremove && sudo apt-get clear cache,然后输入sudo apt-get update && sudo apt-get upgrade。我认为这肯定会起作用。

答案2

对于任何找到此帖子并遇到类似问题的人。我最终只是从 USB 重新启动到 Linux 安装程序,并在损坏的安装之上重新安装 Ubuntu。我仍然不确定为什么会发生这种情况,是什么原因造成的,或者如何使固定它。如果我碰巧发现更多相关信息,我将更新此答案。

答案3

用新的 sources.list 替换了原来的

apt-get dist-upgrade

进而

apt-get 安装 ubuntu 桌面

现在它工作正常

相关内容