从 18.10 升级后,19.04 上没有桌面

从 18.10 升级后,19.04 上没有桌面

我最近从 18.10 升级到了 19.04,桌面不再可用。系统启动到终端。如果我尝试sudo apt install ubuntu-desktop,我会得到一长串依赖性错误:

Reading package lists...
Building dependency tree...
Reading state information...
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:
ubuntu-desktop : Depends: gdm3 but it is not going to be installed
                 Depends: gnome-control-center but it is not going to be installed
                 Depends: gnome-shell but it is not going to be installed
                 Depends: gnome-shell-extension-appindicator but it is not going to be installed
                 Depends: gnome-shell-extension-desktop-icons but it is not going to be installed
                 Depends: gnome-shell-extension-ubuntu-dock but it is not going to be installed
                 Depends: nautilus but it is not going to be installed
                 Depends: ubuntu-desktop-minimal but it is not going to be installed
                 Depends: ubuntu-release-upgrader-gtk but it is not going to be installed
                 Depends: ubuntu-session but it is not going to be installed
                 Depends: update-manager but it is not going to be installed
                 Depends: xorg but it is not going to be installed
                 Depends: yelp but it is not going to be installed
                 Depends: zenity
                 Recommends: cheese but it is not going to be installed
                 Recommends: deja-dup but it is not going to be installed
                 Recommends: gnome-calendar but it is not going to be installed
                 Recommends: gnome-getting-started-docs but it is not going to be installed
                 Recommends: gnome-initial-setup but it is not going to be installed
                 Recommends: gnome-todo but it is not going to be installed
                 Recommends: gvfs-fuse but it is not going to be installed
                 Recommends: nautilus-share but it is not going to be installed
                 Recommends: shotwell but it is not going to be installed
                 Recommends: totem but it is not going to be installed
                 Recommends: ubuntu-docs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试了以下方法来修复 apt,但是没有成功:

sudo apt clean
sudo apt update
sudo apt update --fix-missing
sudo apt upgrade
sudo apt dist-upgrade
sudo dpkg --configure -a
sudo apt install -f

未注释的行/etc/apt/sources.list

deb http://ch.archive.ubuntu.com/ubuntu/ disco main restricted
deb http://ch.archive.ubuntu.com/ubuntu/ disco-updates main restricted
deb http://ch.archive.ubuntu.com/ubuntu/ disco universe
deb http://ch.archive.ubuntu.com/ubuntu/ disco-updates universe
deb http://ch.archive.ubuntu.com/ubuntu/ disco multiverse
deb http://ch.archive.ubuntu.com/ubuntu/ disco-updates multiverse
deb http://ch.archive.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu disco-security main restricted
deb http://security.ubuntu.com/ubuntu disco-security universe
deb http://security.ubuntu.com/ubuntu disco-security multiverse

运行startx结果:

/etc/X11/xinit/xserverrc: 3: exec: /usr/bin/X: not found
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

输出uname -a

Linux XPS13 5.0.0-13-generic #14-Ubuntu SMP Mon Apr 15 14:59:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

apt任何可以帮助修复并最终让我的环境恢复生机的建议都将不胜感激desktop

答案1

最后,我最终重新安装了... :-(

答案2

好的,也许对其他读者有帮助。

遇到这种情况The following packages have unmet dependencies,查找故障的方法之一是使用链式方法:

因此,在这种情况下,你做了:

sudo apt install ubuntu-desktop

它给出了错误:

...
The following packages have unmet dependencies:
ubuntu-desktop : Depends: gdm3 but it is not going to be installed
...

那么你应该这样做:

sudo apt install gdm3

这要么会导致新的未满足依赖项错误,要么您将找到错误的真正原因。在前一种情况下,您将使用不同的未满足的包重复该过程,在后一种情况下,您只需处理问题即可。

相关内容