0

I have recently upgraded from 18.10 to 19.04, and the desktop is no longer available. The system boots to terminal. If I try sudo apt install ubuntu-desktop, I get a long list of dependency errors:

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.

I have tried the followings to repair apt, but without success:

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

Uncommented lines in /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

Running startx results in:

/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

Output of 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

Any suggestions would be highly appreciated that could help repairing apt and ultimately bringing life into my desktop environment again!

  • Kernel 5.0 is very new. An older kernel (I'm using 4.14.110) might work. After installing you can reboot and select it from Grub's Advanced Options submenu. See: https://askubuntu.com/questions/119080/how-to-update-kernel-to-the-latest-mainline-version-without-any-distro-upgrade – WinEunuuchs2Unix Apr 21 '19 at 16:27
  • Thanks for the tip @WinEunuuchs2Unix! I have just tried with kernel 4.18.0-17 (which was already available on the same laptop through grub), but unfortunately that behaves in the same way as the new one. – Zorgmorduk Apr 21 '19 at 16:52

2 Answers2

2

Finally, I have ended up reinstalling... :-(

0

OK, maybe helpful for further readers.

In such cases with The following packages have unmet dependencies, one of the ways to find fault is to use chain method:

So, in this case you did:

sudo apt install ubuntu-desktop

It gave error:

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

Then you should do:

sudo apt install gdm3

This will either cause new unmet dependencies error or you will find true cause of an error. In former case, you will repeat the process with different unmet package, in latter case you just deal with the problem.

Olimjon
  • 7,292
  • Thanks @Olimjon for the proposal! I did try that, and not only with the gdm3, but with other listed packages as well. Unfortunately, subsequent dependency errors followed, and no matter how deeply I iterated into the dependency hell, it did not resolve. I fear if it could have solved with only iterations, apt could have done that by itself. – Zorgmorduk Apr 26 '19 at 17:22
  • @Zorgmorduk, well in that case considering using aptitude might be helpful. However, I am not 100% sure. – Olimjon Apr 27 '19 at 12:49