4

So before I format my hard drive and do a clean install (just like I did 6 months ago) is there a magical command that can fix this problem? I should point out the Nvidia driver is working great (nvidia-driver-418), I can play native games and windows-only games just fine right now, but:

sudo apt autoremove

the following packages have unmet dependencies.
 libnvidia-decode-418 : Depends: libnvidia-compute-418 (= 418.56-0ubuntu1) but it is not installed
 libnvidia-decode-418:i386 : Depends: libnvidia-compute-418:i386 (= 418.56-0ubuntu1) but it is not installed
 libnvidia-gl-418 : Depends: libnvidia-compute-418 but it is not installed
 nvidia-compute-utils-418 : Depends: libnvidia-compute-418 but it is not installed
 nvidia-driver-418 : Depends: libnvidia-compute-418 (= 418.56-0ubuntu1) but it is not installed
                     Recommends: libnvidia-compute-418:i386 (= 418.56-0ubuntu1)
 nvidia-utils-418 : Depends: libnvidia-compute-418 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

And then...

sudo apt --fix-broken install

dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-410_418.56-0ubuntu1_amd64.deb (--unpack):
 package libnvidia-compute-410:amd64 (418.56-0ubuntu1) with field 'Multi-Arch: no' is not co-installable with libnvidia-compute-410 which has multiple installed instances
dpkg: regarding .../libnvidia-compute-418_418.56-0ubuntu1_amd64.deb containing libnvidia-compute-418:amd64:
 libnvidia-compute-418 conflicts with libcuda-10.0-1
  libnvidia-compute-410:amd64 provides libcuda-10.0-1 and is present and installed.

dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-418_418.56-0ubuntu1_amd64.deb (--unpack):
 conflicting packages - not installing libnvidia-compute-418:amd64
dpkg: regarding .../libnvidia-compute-418_418.56-0ubuntu1_i386.deb containing libnvidia-compute-418:i386:
 libnvidia-compute-418:i386 conflicts with libcuda-10.0-1
  libnvidia-compute-410:amd64 provides libcuda-10.0-1 and is present and installed.

dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-418_418.56-0ubuntu1_i386.deb (--unpack):
 conflicting packages - not installing libnvidia-compute-418:i386
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-compute-410_418.56-0ubuntu1_amd64.deb
 /var/cache/apt/archives/libnvidia-compute-418_418.56-0ubuntu1_amd64.deb
 /var/cache/apt/archives/libnvidia-compute-418_418.56-0ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Every sudo apt command I've tried just won't do anything because of the broken package dependencies.

So, is there a sudo remove-all-the-broken-stuff command?

I did install some CUDA packages a while back, but it turns out I didn't need to. I just need whatever Nvidia graphics driver is supposed to be installed with Ubuntu 19.04 right now (April 2019) and none of the non-essential Nvidia/CUDA packages. How might I accomplish this without formatting the hard drive?

UPDATE: Looks like a confirmed bug

1 Answer 1

8

Answering my own question ;-) Current workaround/solution for this confirmed bug:

  • Backup file /var/lib/dpkg/status
  • edit the file as superuser, look for each section that starts with "Package: libnvidia-compute-410", remove not just that line, but that section. There might be more than one.
  • Save the file and issue the command sudo apt-get --fix-broken install which should now, not complain
  • You can then go ahead and sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
  • Reboot and you will probably have the non-Nvidia driver, so go to software & updates > Additional drivers and install the Nvidia driver of your choice...and reboot again.

(this is not the official fix, just a workaround someone came up with)

3
  • Re: the recent edit to my answer: I haven't used "apt-get" since 2016, is it still needed when "apt" works fine? This problem only seems to occur on Ubuntu 19.04 May 11, 2019 at 14:50
  • You are right, isn't needed anymore. I don't know what is the general rule for apt commands. Saying that, the edition of the text style is correct, isn't it?
    – Aracem
    May 14, 2019 at 14:59
  • Yes, the text formatting looks clearer now, thanks. May 16, 2019 at 11:37

You must log in to answer this question.

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