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
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 runningsudo apt-get purge nvidia-*
in your terminal. – ipkpjersi Sep 19 '18 at 17:56