3

installing nvidia driver 435 currently breaks packages :

t@tsu:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
The following NEW packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/80,3 MB of archives.
After this operation, 290 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 179931 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb (--unpack):
 new libnvidia-gl-435:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb (--unpack):
 new libnvidia-gl-435:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


t@tsu:~$ sudo apt update --fix-missing
Hit:1 http://fr.archive.ubuntu.com/ubuntu disco InRelease
Hit:2 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu disco InRelease
Hit:3 http://repo.steampowered.com/steam precise InRelease                     
Hit:4 http://fr.archive.ubuntu.com/ubuntu disco-updates InRelease              
Hit:5 http://fr.archive.ubuntu.com/ubuntu disco-backports InRelease            
Get:6 http://security.ubuntu.com/ubuntu disco-security InRelease [97,5 kB]     
Ign:7 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:8 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu disco InRelease     
Hit:9 http://dl.google.com/linux/chrome/deb stable Release  
Hit:10 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu disco InRelease
Fetched 97,5 kB in 1s (69,6 kB/s)                         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
t@tsu:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
The following NEW packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/80,3 MB of archives.
After this operation, 290 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 179931 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb (--unpack):
 new libnvidia-gl-435:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb (--unpack):
 new libnvidia-gl-435:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
t@tsu:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libnvidia-ifr1-435:amd64:
 libnvidia-ifr1-435:amd64 depends on libnvidia-gl-435; however:
  Package libnvidia-gl-435:amd64 is not installed.

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

dpkg: error processing package libnvidia-ifr1-435:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-driver-435:
 nvidia-driver-435 depends on libnvidia-gl-435 (= 435.21-0ubuntu0~19.04.1~gpu0); however:
  Package libnvidia-gl-435:amd64 is not installed.
 nvidia-driver-435 depends on libnvidia-ifr1-435 (= 435.21-0ubuntu0~19.04.1~gpu0); however:
  Package libnvidia-ifr1-435:amd64 is not configured yet.

dpkg: error processing package nvidia-driver-435 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Errors were encountered while processing:
 libnvidia-ifr1-435:amd64
 libnvidia-ifr1-435:i386
 nvidia-driver-435
t@tsu:~$ sudo dpkg -l | grep ^..r
t@tsu:~$ sudo dpkg --remove --force-remove --reinstreq
dpkg: error: unknown force/refuse option 'remove'

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
t@tsu:~$ sudo apt clean
t@tsu:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu disco InRelease
Hit:2 http://fr.archive.ubuntu.com/ubuntu disco InRelease                      
Hit:3 http://repo.steampowered.com/steam precise InRelease                     
Get:4 http://security.ubuntu.com/ubuntu disco-security InRelease [97,5 kB]     
Hit:5 http://fr.archive.ubuntu.com/ubuntu disco-updates InRelease              
Hit:6 http://fr.archive.ubuntu.com/ubuntu disco-backports InRelease            
Hit:7 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu disco InRelease     
Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:9 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:10 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu disco InRelease  
Fetched 97,5 kB in 1s (68,2 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
t@tsu:~$ sudo apt 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-435 : Depends: libnvidia-gl-435 but it is not installed
 libnvidia-ifr1-435:i386 : Depends: libnvidia-gl-435:i386 but it is not installed
 nvidia-driver-435 : Depends: libnvidia-gl-435 (= 435.21-0ubuntu0~19.04.1~gpu0) but it is not installed
                     Recommends: libnvidia-gl-435:i386 (= 435.21-0ubuntu0~19.04.1~gpu0)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
t@tsu:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
The following NEW packages will be installed:
  libnvidia-gl-435 libnvidia-gl-435:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 80,3 MB of archives.
After this operation, 290 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu disco/main i386 libnvidia-gl-435 i386 435.21-0ubuntu0~19.04.1~gpu0 [17,3 MB]
Get:2 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu disco/main amd64 libnvidia-gl-435 amd64 435.21-0ubuntu0~19.04.1~gpu0 [63,0 MB]
Fetched 80,3 MB in 14s (5 561 kB/s)                                            
(Reading database ... 179931 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb (--unpack):
 new libnvidia-gl-435:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_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-435'
  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-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb (--unpack):
 new libnvidia-gl-435:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_i386.deb
 /var/cache/apt/archives/libnvidia-gl-435_435.21-0ubuntu0~19.04.1~gpu0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
0

1 Answer 1

3

I fixed it uninstalling nvidia drivers using: sudo apt purge *nvidia* sudo apt autoremove *nvidia* I had the same issue and I read that the problem is caused for old packages or dependencies of another nvidia driver previously installed. Once you run the above commands you can do the installation again.

3
  • i actually typed purge nividia* in the middle of the above, I removed it because the ouput was over the askubuntu character limit. it did not work. I ended up reinstalling my OS to fix it.
    – tatsu
    Sep 21, 2019 at 10:04
  • Well anyway if another user comes here with a similar problem this may help askubuntu.com/questions/1035409/…
    – TheGen
    Sep 21, 2019 at 10:44
  • honestly no. this usually works yes but with this particular case I found it doesn't.
    – tatsu
    Sep 21, 2019 at 11:32

You must log in to answer this question.

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