I'm on 18.04 right now and was about to upgrade to 20.04. My package manager offered me both a partial upgrade and a dist upgrade as options. I figured it was best to run the partial upgrade first and try to resolve any outstanding issues before I upgrade to 20.04. This seems to have broken my system now. After rebooting, it just hangs and never starts up (I left it more than 24 hours and it never budged from a black/white TTY that simply had a message that /dev/sda1 was clean).
I was able to reboot and select the previous kernel version (5.4.0-51-generic), and my system booted, but was using the nouveau driver and the resolution was absurd. Unfortunately the display options didn't offer any option to change it, so I tried installing the nvidia proprietary drivers (again -- they were previously installed). I am still able to boot using the old kernel, but I cannot seem to fix my broken packages. For example:
$ sudo apt install nvidia-driver-455
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:
libnvidia-gl-450-server : Depends: libnvidia-common-450-server but it is not going to be installed
libnvidia-gl-450-server:i386 : Depends: libnvidia-common-450-server:i386
nvidia-driver-455 : Depends: libnvidia-gl-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: nvidia-dkms-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: nvidia-kernel-source-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-compute-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-extra-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: nvidia-compute-utils-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-decode-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-encode-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: nvidia-utils-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: xserver-xorg-video-nvidia-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-cfg1-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-ifr1-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Depends: libnvidia-fbc1-455 (= 455.32.00-0ubuntu1) but it is not going to be installed
Recommends: libnvidia-compute-455:i386 (= 455.32.00-0ubuntu1)
Recommends: libnvidia-decode-455:i386 (= 455.32.00-0ubuntu1)
Recommends: libnvidia-encode-455:i386 (= 455.32.00-0ubuntu1)
Recommends: libnvidia-ifr1-455:i386 (= 455.32.00-0ubuntu1)
Recommends: libnvidia-fbc1-455:i386 (= 455.32.00-0ubuntu1)
Recommends: libnvidia-gl-455:i386 (= 455.32.00-0ubuntu1)
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libnvidia-common-450
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libnvidia-common-450-server
The following NEW packages will be installed:
libnvidia-common-450-server
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
5 not fully installed or removed.
Need to get 9,928 B of archives.
After this operation, 35.8 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 libnvidia-common-450-server all 450.80.02-0ubuntu0.18.04.3 [9,928 B]
Fetched 9,928 B in 0s (88.0 kB/s)
(Reading database ... 282148 files and directories currently installed.)
Preparing to unpack .../libnvidia-common-450-server_450.80.02-0ubuntu0.18.04.3_all.deb ...
Unpacking libnvidia-common-450-server (450.80.02-0ubuntu0.18.04.3) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-common-450-server_450.80.02-0ubuntu0.18.04.3_all.deb (--unpack):
trying to overwrite '/usr/share/nvidia/nvidia-application-profiles-450.80.02-key-documentation', which is also in package libnvidia-common-450 450.80.02-0ubuntu1
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-common-450-server_450.80.02-0ubuntu0.18.04.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
How do I get back up and running here? Can I fix things here on 18.04 or do I simply boot up with a 20.04 USB key and just tell it to upgrade my existing install? I have tried running apt autoclean
and apt clean
and those don't help either.