0

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.

1
  • 1
    remove all nvidia packages. Before a distribution update it is in my opinion a good idea to remove closed source drivers
    – nobody
    Oct 27, 2020 at 20:17

2 Answers 2

1

I resolved this by simply trying to remove the libnvidia-gl-450-server package, which would then complain about the libnvidia-gl-450-server:i386 package, and then that would complain about another package, etc. I kept re-running the command, adding each new package that it complained about until I finally got a full list of packages that needed to be removed. Ultimately, this happened to be my list, but it could vary depending on your system and/or which packages are broken:

sudo apt-get remove libnvidia-gl-450-server libnvidia-gl-450-server:i386 nvidia-driver-450-server libnvidia-ifr1-450-server libnvidia-ifr1-450-server:i386

I then ran sudo apt update and it completed successfully. I installed all of the waiting updates, rebooted my machine (since there was a kernel update), and now it boots up just fine with functional nvidia drivers on the latest kernel, and my package system is fixed. I will now proceed with the LTS update.

0

First of all, read the output of the command you just have run:

You might want to run 'apt --fix-broken install' to correct these.

... now do that, as far as I know it is a sane option to try.

if that doesn't help, then remove the offending package; i.e.

sudo apt purge nvidia-driver-455

followed by the options to clean up what remains. e.g.

sudo apt autoremove
sudo apt autoclean

The package names on the first lines, e.g. libnvidia-gl-450-server:i386, may indicate that you're on a 32 bit system - i.e. by displaying :386.

I'm quite sure having read that 32 bit system support has been dropped for base Ubuntu: if you indeed are trying to upgrade a 32 bit system; you might need to look up another distro that still does support the older architecture.

If that is not the case, try other nvidia driver packages, or even the nvidia-provided runtime (run it from the recovery console!), assuming there is a version that suits the hardware.

7
  • Thanks for the help, but please read the output above again. I did run sudo apt --fix-broken install. It's literally the second command shown in the output above, and results in a dpkg error. I will try purging the nvidia package and see what happens. This is not a 32-bit system. It's somewhat old, but not that old (Haswell i7).
    – twofifty6
    Oct 28, 2020 at 1:25
  • I tried purging everything, including sudo apt purge nvidia*. Same error every time: ``` The following packages have unmet dependencies: libnvidia-gl-450-server:i386 : Depends: libnvidia-common-450-server:i386 libnvidia-ifr1-450-server : Depends: libnvidia-gl-450-server but it is not going to be installed nvidia-driver-450-server : Depends: libnvidia-gl-450-server (= 450.80.02-0ubuntu0.18.04.3) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ```
    – twofifty6
    Oct 28, 2020 at 1:28
  • How about sudo apt purge libnvidia-gl-450-server:i386 alone? or even dpkg --purge ... ?
    – Hannu
    Oct 28, 2020 at 15:31
  • dpkg --purge --force-all --simulate - check what this prints (i.e. what would be attempted if running dpkg --purge --force-all )
    – Hannu
    Oct 28, 2020 at 15:38
  • Had to put other options prior to purge but here it is: ``` $ sudo dpkg --simulate --force-all --purge libnvidia-gl-450-server:i386 dpkg: libnvidia-gl-450-server:i386: dependency problems, but removing anyway as you requested: libnvidia-ifr1-450-server:i386 depends on libnvidia-gl-450-server. (Reading database ... 282147 files and directories currently installed.) Would remove or purge libnvidia-gl-450-server:i386 (450.80.02-0ubuntu0.18.04.3) ... ``` Does that really matter though? 64-bit can run 32-bit libs. Doesn't steam even require some 32-bit libs?
    – twofifty6
    Oct 28, 2020 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .