[SOLVED] Problem installing Nvidia driver on mint 19, maybe broken dependencies?

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
Post Reply
hubertokf
Level 1
Level 1
Posts: 2
Joined: Tue Jun 02, 2020 10:43 pm

[SOLVED] Problem installing Nvidia driver on mint 19, maybe broken dependencies?

Post by hubertokf »

Every time i try to install nvidia driver i get those error, with every version.

Code: Select all

installArchives() failed: Selecting previously unselected package libnvidia-cfg1-440:amd64.
(Reading database ... 
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 326264 files and directories currently installed.)
Preparing to unpack .../00-libnvidia-cfg1-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-common-440.
Preparing to unpack .../01-libnvidia-common-440_440.59-0ubuntu0.18.04.1_all.deb ...
Unpacking libnvidia-common-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-compute-440:i386.
Preparing to unpack .../02-libnvidia-compute-440_440.59-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-compute-440:i386 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-compute-440:amd64.
Preparing to unpack .../03-libnvidia-compute-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-compute-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-decode-440:amd64.
Preparing to unpack .../04-libnvidia-decode-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-decode-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-decode-440:i386.
Preparing to unpack .../05-libnvidia-decode-440_440.59-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-decode-440:i386 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-encode-440:amd64.
Preparing to unpack .../06-libnvidia-encode-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-encode-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-encode-440:i386.
Preparing to unpack .../07-libnvidia-encode-440_440.59-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-encode-440:i386 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-fbc1-440:amd64.
Preparing to unpack .../08-libnvidia-fbc1-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-fbc1-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-fbc1-440:i386.
Preparing to unpack .../09-libnvidia-fbc1-440_440.59-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-fbc1-440:i386 (440.59-0ubuntu0.18.04.1) ...
Preparing to unpack .../10-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
dpkg-query: no packages found matching libnvidia-gl-435
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-440'
  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 /tmp/apt-dpkg-install-COne1j/10-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_amd64.deb (--unpack):
 new libnvidia-gl-440:amd64 package pre-installation script subprocess returned error exit status 2
Selecting previously unselected package libnvidia-gl-440:i386.
Preparing to unpack .../11-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_i386.deb ...
dpkg-query: no packages found matching libnvidia-gl-435
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-440'
  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 /tmp/apt-dpkg-install-COne1j/11-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_i386.deb (--unpack):
 new libnvidia-gl-440:i386 package pre-installation script subprocess returned error exit status 2
Selecting previously unselected package libnvidia-ifr1-440:i386.
Preparing to unpack .../12-libnvidia-ifr1-440_440.59-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-ifr1-440:i386 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libnvidia-ifr1-440:amd64.
Preparing to unpack .../13-libnvidia-ifr1-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-ifr1-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package libxnvctrl0:amd64.
Preparing to unpack .../14-libxnvctrl0_440.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libxnvctrl0:amd64 (440.44-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-compute-utils-440.
Preparing to unpack .../15-nvidia-compute-utils-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-kernel-source-440.
Preparing to unpack .../16-nvidia-kernel-source-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-kernel-common-440.
Preparing to unpack .../17-nvidia-kernel-common-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-dkms-440.
Preparing to unpack .../18-nvidia-dkms-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-dkms-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-utils-440.
Preparing to unpack .../19-nvidia-utils-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-utils-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package xserver-xorg-video-nvidia-440.
Preparing to unpack .../20-xserver-xorg-video-nvidia-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking xserver-xorg-video-nvidia-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-driver-440.
Preparing to unpack .../21-nvidia-driver-440_440.59-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-driver-440 (440.59-0ubuntu0.18.04.1) ...
Selecting previously unselected package nvidia-prime.
Preparing to unpack .../22-nvidia-prime_0.8.8.2_all.deb ...
Unpacking nvidia-prime (0.8.8.2) ...
Selecting previously unselected package screen-resolution-extra.
Preparing to unpack .../23-screen-resolution-extra_0.17.3_all.deb ...
Unpacking screen-resolution-extra (0.17.3) ...
Selecting previously unselected package nvidia-settings.
Preparing to unpack .../24-nvidia-settings_440.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking nvidia-settings (440.44-0ubuntu0.18.04.1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-COne1j/10-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_amd64.deb
 /tmp/apt-dpkg-install-COne1j/11-libnvidia-gl-440_440.59-0ubuntu0.18.04.1_i386.deb
Setting up libnvidia-common-440 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-prime (0.8.8.2) ...
Setting up libnvidia-fbc1-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Setting up libnvidia-fbc1-440:i386 (440.59-0ubuntu0.18.04.1) ...
Setting up libnvidia-compute-440:i386 (440.59-0ubuntu0.18.04.1) ...
Setting up libnvidia-compute-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-utils-440 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-kernel-common-440 (440.59-0ubuntu0.18.04.1) ...
update-initramfs: deferring update (trigger activated)
Setting up libnvidia-cfg1-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Setting up screen-resolution-extra (0.17.3) ...
dpkg: dependency problems prevent configuration of nvidia-driver-440:
 nvidia-driver-440 depends on libnvidia-gl-440 (= 440.59-0ubuntu0.18.04.1); however:
  Package libnvidia-gl-440:amd64 is not installed.

dpkg: error processing package nvidia-driver-440 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnvidia-ifr1-440:i386:
 libnvidia-ifr1-440:i386 depends on libnvidia-gl-440; however:
  Package libnvidia-gl-440:i386 is not installed.

dpkg: error processing package libnvidia-ifr1-440:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnvidia-ifr1-440:amd64:
 libnvidia-ifr1-440:amd64 depends on libnvidia-gl-440; however:
  Package libnvidia-gl-440:amd64 is not installed.

dpkg: error processing package libnvidia-ifr1-440:amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up libnvidia-decode-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Setting up libnvidia-decode-440:i386 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-compute-utils-440 (440.59-0ubuntu0.18.04.1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 122) ...
Adding new group `nvidia-persistenced' (GID 129) ...
Adding new user `nvidia-persistenced' (UID 122) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up libnvidia-encode-440:amd64 (440.59-0ubuntu0.18.04.1) ...
Setting up libnvidia-encode-440:i386 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-kernel-source-440 (440.59-0ubuntu0.18.04.1) ...
Setting up libxnvctrl0:amd64 (440.44-0ubuntu0.18.04.1) ...
Setting up xserver-xorg-video-nvidia-440 (440.59-0ubuntu0.18.04.1) ...
Setting up nvidia-dkms-440 (440.59-0ubuntu0.18.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-440.59 DKMS files...
Building for 5.3.0-53-generic
Building for architecture x86_64
Building initial module for 5.3.0-53-generic
This system doesn't support Secure Boot
Secure Boot not enabled on this system.
Done.

nvidia:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/kernel/drivers/char/drm/

nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/kernel/drivers/char/drm/

nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/kernel/drivers/char/drm/

nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/kernel/drivers/char/drm/

depmod...

DKMS: install completed.
Setting up nvidia-settings (440.44-0ubuntu0.18.04.1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint8) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-5.3.0-53-generic
After this error It start to git this error on every apt command:

Code: Select all

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-ifr1-440 : Depends: libnvidia-gl-440 but it is not installed
 libnvidia-ifr1-440:i386 : Depends: libnvidia-gl-440:i386 but it is not installed
 nvidia-driver-440 : Depends: libnvidia-gl-440 (= 440.59-0ubuntu0.18.04.1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Then, to fix that, i must run

Code: Select all

sudo aptitude install
sudo apt purge *nvidia*
sudo apt autoremove
inxi -Fxz

Code: Select all

System:
  Host: desktop Kernel: 5.3.0-53-generic x86_64 bits: 64 compiler: gcc 
  v: 7.5.0 Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia 
  base: Ubuntu 18.04 bionic 
Machine:
  Type: Desktop Mobo: ASUSTeK model: MAXIMUS V GENE v: Rev 1.xx 
  serial: <filter> UEFI: American Megatrends v: 1408 date: 11/09/2012 
Battery:
  Device-1: hidpp_battery_0 
  model: Logitech Wireless Mobile Mouse MX Anywhere 2S charge: 55% 
  status: Discharging 
CPU:
  Topology: Quad Core model: Intel Core i7-3770K bits: 64 type: MT MCP 
  arch: Ivy Bridge rev: 9 L2 cache: 8192 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 56295 
  Speed: 3140 MHz min/max: 1600/3900 MHz Core speeds (MHz): 1: 2331 2: 2317 
  3: 2388 4: 2704 5: 2015 6: 2299 7: 2123 8: 2396 
Graphics:
  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics 
  vendor: ASUSTeK P8 series driver: i915 v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GK104 [GeForce GTX 660 Ti] vendor: eVga.com. 
  driver: nouveau v: kernel bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.5 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1920x1080~60Hz, 2560x1080~60Hz 
  OpenGL: renderer: NVE4 v: 4.3 Mesa 19.2.8 direct render: Yes 
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: NVIDIA GK104 HDMI Audio vendor: eVga.com. driver: snd_hda_intel 
  v: kernel bus ID: 01:00.1 
  Sound Server: ALSA v: k5.3.0-53-generic 
Network:
  Device-1: Intel 82579V Gigabit Network vendor: ASUSTeK P8P67 Deluxe 
  driver: e1000e v: 3.2.6-k port: f080 bus ID: 00:19.0 
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IF-ID-1: br-856cdee728c4 state: down mac: <filter> 
  IF-ID-2: docker0 state: down mac: <filter> 
Drives:
  Local Storage: total: 1.36 TiB used: 80.69 GiB (5.8%) 
  ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
  ID-2: /dev/sdb vendor: Western Digital model: WD10EARS-00Y5B1 
  size: 931.51 GiB temp: 25 C 
  ID-3: /dev/sdc vendor: Samsung model: SSD 840 Series size: 232.89 GiB 
Partition:
  ID-1: / size: 227.74 GiB used: 80.68 GiB (35.4%) fs: ext4 dev: /dev/sda2 
Sensors:
  System Temperatures: cpu: 39.0 C mobo: N/A gpu: nouveau temp: 42 C 
  Fan Speeds (RPM): cpu: 0 gpu: nouveau fan: 1260 
Info:
  Processes: 271 Uptime: 15m Memory: 15.33 GiB used: 2.45 GiB (16.0%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.5.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32 
I've tried almost everything on internet. Any chance to install it? :?
Last edited by hubertokf on Wed Jun 03, 2020 3:11 pm, edited 2 times in total.
User avatar
roblm
Level 12
Level 12
Posts: 4412
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem installing Nvidia driver on mint 19, maybe broken dependencies?

Post by roblm »

dpkg-divert: error: mismatch on package
when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-440'
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'
Those lines from the installation log are sometimes seen when the nvidia-340 driver was initially installed and then a newer driver installation is attempted. Use this command to remove those messages:

Code: Select all

for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do sudo dpkg-divert --remove $FILE; done
Then try installing the Nvidia driver again: apt install --reinstall nvidia-driver-440

If it won’t install, then use this command: apt --fix-broken install
hubertokf
Level 1
Level 1
Posts: 2
Joined: Tue Jun 02, 2020 10:43 pm

Re: Problem installing Nvidia driver on mint 19, maybe broken dependencies?

Post by hubertokf »

roblm wrote:
Wed Jun 03, 2020 1:50 pm
dpkg-divert: error: mismatch on package
when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-440'
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'
Those lines from the installation log are sometimes seen when the nvidia-340 driver was initially installed and then a newer driver installation is attempted. Use this command to remove those messages:

Code: Select all

for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do sudo dpkg-divert --remove $FILE; done
Then try installing the Nvidia driver again: apt install --reinstall nvidia-driver-440

If it won’t install, then use this command: apt --fix-broken install
Wow! Everything is installed now. You don't know how long i'm with this problem. Thank you very much!

So, this first command is removing every package related to this version? I was thinking that purge nvidia* should remove everything.

Again, thank you very much! :D
User avatar
roblm
Level 12
Level 12
Posts: 4412
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem installing Nvidia driver on mint 19, maybe broken dependencies?

Post by roblm »

hubertokf wrote: So, this first command is removing every package related to this version? I was thinking that purge nvidia* should remove everything.
This article has some info:
http://www.debianadmin.com/replace-bina ... ivert.html

This whole topic of file diversions is still a little confusing to me and why it has only happened when the nvidia-340 driver has previously been installed and why it only happens sometimes.
Post Reply

Return to “Graphics Cards & Monitors”