0

There is a problem in my ubuntu to do with the libnvidia packages. It looks like there are 2 different drivers installed I think maybe?

I have tried several troubleshooting steps like

sudo dpkg --configure -a

and

sudo apt-get install -f

and

sudo apt remove libnvidia-compute-440

and

sudo apt-get remove --purge '^nvidia-.*'

and

sudo apt autoremove

and

sudo rm /var/cache/apt/archives/libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb

Here is the error

sudo apt-get upgrade

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-decode-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is installed
 nvidia-driver-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is installed
                     Recommends: libnvidia-compute-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-decode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-encode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-ifr1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-fbc1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-gl-440:i386 (= 440.118.02-0ubuntu1)

It looks like I need to remove 440.100-0ubuntu0.18.04.1. Is that right? How would I do that?

1
  • Look again at the installed nvidia packages with a command like dpkg -l | grep nvidia Many don't start with "nvidia.." Purge them all and start installing the recommended Nvidia package from Software and Updates/Additional Drivers.
    – ubfan1
    Oct 29, 2020 at 23:49

1 Answer 1

2

I had same problem, and solved with purge all unmet dependencies. Here are my steps:

1. Check dependencies related to nvidia

$ dpkg -l | grep nvidia
ii  libnvidia-cfg1-440:amd64                           440.118.02-0ubuntu1                              amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-418                               418.165.02-0ubuntu1                              all          Shared files used by the NVIDIA libraries
ii  libnvidia-common-440                               440.118.02-0ubuntu1                              all          Shared files used by the NVIDIA libraries
ii  libnvidia-common-455                               455.32.00-0ubuntu1                               
...

2. Try to purge the first package

$ sudo apt purge libnvidia-cfg1-440:amd64
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-decode-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
 nvidia-driver-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
                     Depends: libnvidia-cfg1-440 (= 440.118.02-0ubuntu1) but it is not going to be installed
                     Recommends: libnvidia-compute-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-decode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-encode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-ifr1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-fbc1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-gl-440:i386 (= 440.118.02-0ubuntu1)
 xserver-xorg-video-nvidia-440 : Depends: libnvidia-cfg1-440 (= 440.118.02-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

(or some similar error message to the above)

3. Add purged package which has unmet dependencies

There is libnvidia-decode-440 in error message, and tried remove that package,

$ sudo apt purge libnvidia-decode-440
...skipped same message
The following packages have unmet dependencies:
 cuda-drivers : Depends: libnvidia-decode-440 (>= 440.64.00) but it is not going to be installed
 libnvidia-encode-440 : Depends: libnvidia-decode-440 but it is not going to be installed
 nvidia-driver-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
                     Depends: libnvidia-decode-440 (= 440.118.02-0ubuntu1) but it is not 
...skipped same message

Unmet dependencies in error message is changed libnvidia-encode-440, So tried both package,

$ sudo apt purge libnvidia-encode-440 libnvidia-decode-440
...
The following packages have unmet dependencies:
 cuda-drivers : Depends: libnvidia-decode-440 (>= 440.64.00) but it is not going to be installed
                Depends: libnvidia-encode-440 (>= 440.64.00) but it is not going to be installed
 nvidia-driver-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
                     Depends: libnvidia-decode-440 (= 440.118.02-0ubuntu1) but it is not going to be installed
                     Depends: libnvidia-encode-440 (= 440.118.02-0ubuntu1) but it is not going to be installed
...

Seems libnvidia-encode-440 libnvidia-decode-440 is solved. So I keep trying fix all unmet dependencies like this steps. So, my final command was

$ sudo apt purge -f libnvidia-encode-440 libnvidia-decode-440 cuda-drivers nvidia-driver-440 cuda-runtime-10-1 cuda-10-1 cuda-demo-suite-10-1

and it worked. After removing nvidia and cuda package, I'm re-installing gpu drivers...

Good luck!

You must log in to answer this question.

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