0

I've recently installed Juno, and today I ran into this problem: AppCenter > Updates > Drivers: both nvidia-340 and nvidia-driver-390 are unable to update.

nvidia-driver-390 displays "Error while installing package: new libnvidia-gl-390"

nvidia-340 displays "Error while installing package: trying to overwrite '/lib/udev/rules.d/71-nvidia.rules', which is also in package nvidia-kernel-common-390 390.77-0ubuntu0.18.04.1"

I'm not a linux pro user and this problem never happened to me in one year of Loki. o I tried with some basic commands like "sudo apt autoremove", "sudo apt --fix-broken install", and the terminal displays:

  • sudo apt-get autoremove

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-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.77-0ubuntu0.18.04.1) but it is not installed Recommends: libnvidia-gl-390:i386 (= 390.77-0ubuntu0.18.04.1) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

  • sudo apt --fix-broken install

Reading package lists... Done Building dependency tree
Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: lib32gcc1 libc6-i386 ocl-icd-libopencl1 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libnvidia-gl-390 libnvidia-gl-390:i386 The following NEW packages will be installed libnvidia-gl-390 libnvidia-gl-390:i386 0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade. 40 not fully installed or removed. Need to get 0 B/29.2 MB of archives. After this operation, 147 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 258970 files and directories currently installed.) Preparing to unpack .../libnvidia-gl-390_390.77-0ubuntu0.18.04.1_amd64.deb ... 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-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.77-0ubuntu0.18.04.1_amd64.deb (--unpack): new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2 Preparing to unpack .../libnvidia-gl-390_390.77-0ubuntu0.18.04.1_i386.deb ... diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340 dpkg-divert: error: mismatch on package when removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 by libnvidia-gl-390' found 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340' dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.77-0ubuntu0.18.04.1_i386.deb (--unpack): new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/libnvidia-gl-390_390.77-0ubuntu0.18.04.1_amd64.deb /var/cache/apt/archives/libnvidia-gl-390_390.77-0ubuntu0.18.04.1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Has anyone got this problem? Or better, does anyone know how to fix it?

EDIT: I've also run these commands: - nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

-nvidia-settings

ERROR: NVIDIA driver is not loaded ERROR: Error querying enabled displays on GPU 0 (Missing Extension). ERROR: Error querying connected displays on GPU 0 (Missing Extension). ** Message: 15:00:09.089: PRIME: Requires offloading ** Message: 15:00:09.089: PRIME: is it supported? yes ERROR: nvidia-settings could not find the registry key file. This file should have been installed along with this driver at /usr/share/nvidia/nvidia-application-profiles-key-docum entation. The application profiles will continue to work, but values cannot be prepopulated or validated, and will not be listed in the help text. Please see the README for possible values and descriptions.

Thanks for your time.

  • You shouldn't have installed 2 drivers for the same card. Just use one of those. The easy solution would be removing a driver with sudo apt autoremove nvidia-390* or sudo apt autoremove nvidia-340*. But first make a backup of any important files you may have in your installation. If you get a black screen when you reboot you'd need to reinstall elementary. – Maccer Jan 13 at 15:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.