0

I am running Ubuntu 18.04 and I cannot get my system to work with Nvidia drivers.

Every time I select any proprietary Nvidia driver (other than the Noveau driver), I get errors.

This is the error I usually get:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-ifr1-390 : Depends: libnvidia-gl-390 but it is not installed
 libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not installed
 nvidia-driver-390 : Depends: libnvidia-gl-390 (= 390.48-0ubuntu3) but it is not installed
                     Recommends: libnvidia-gl-390:i386 (= 390.48-0ubuntu3)
E: Unmet dependencies. Try '' with no packages (or specify a solution).

So, I run sudo apt --fix-broken install as it prompts me, and then I get the following error:

dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_amd64.deb (--unpack):
 new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_i386.deb
 /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can anyone help me fix this?

EDIT 1: I completely uninstalled ALL Nvidia drivers, and then just tried to install the 390 drivers. I got the following error message:

E: /tmp/apt-dpkg-install-nItDms/11-libnvidia-gl-390_390.48-0ubuntu3_amd64.deb: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
E: /tmp/apt-dpkg-install-nItDms/14-libnvidia-gl-390_390.48-0ubuntu3_i386.deb: new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
etsnyman
  • 1,125
  • 1
    you have to uninstall the 340 version and then install the 390 version afterwards. That's the error you're getting because they're both trying to use the same file. – Thomas Ward Sep 19 '18 at 15:54
  • Thanks for the reply. The 340 version is not installed at the moment. Just the open-source Noveau drivers. – etsnyman Sep 19 '18 at 15:58
  • 1
    Not according to that error message, it says it's installed. – Thomas Ward Sep 19 '18 at 16:03
  • Thanks for the reply. That's weird, I don't see the 340 version anywhere. I've checked installed versions and I don't see it in the error message. Could you help me again? – etsnyman Sep 19 '18 at 16:05
  • The porition of the error message that says found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340' indicates that nvidia-340 might be installed. Try running sudo apt-get purge nvidia-* in your terminal. – ipkpjersi Sep 19 '18 at 17:56

1 Answers1

0

Thank you all for your kind replies.

Apparently there is a bug that affects some users. After much Googling, I found the solution to my problem, which was in a comment on this bug report: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1768050

This might only affect 18.04, but if anyone stumbles accross this, see the bug report please.

etsnyman
  • 1,125