0

I tried installing nvidia-driver-440 to upgrade my graphics driver.

Everything went well at first apt install nvidia-driver-440 as root userr proceeded as usual, but broke somewhere and returned an error.

I usually fix problems like this with apt fix-broken install, but this didn't work this time and led to another error:

    root@LesserArk:/home/sarah# 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:
  lib32gcc-s1 lib32gcc1 libc6-i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-gl-440 libnvidia-gl-440:i386
The following NEW packages will be installed:
  libnvidia-gl-440 libnvidia-gl-440:i386
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
3 not fully installed or removed.
Need to get 0 B/79.6 MB of archives.
After this operation, 281 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 243074 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-440_440.82+really.440.64-0ubuntu6_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-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 /var/cache/apt/archives/libnvidia-gl-440_440.82+really.440.64-0ubuntu6_i386.deb (--unpack):
 new libnvidia-gl-440:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-440_440.82+really.440.64-0ubuntu6_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-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 /var/cache/apt/archives/libnvidia-gl-440_440.82+really.440.64-0ubuntu6_amd64.deb (--unpack):
 new libnvidia-gl-440:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-440_440.82+really.440.64-0ubuntu6_i386.deb
 /var/cache/apt/archives/libnvidia-gl-440_440.82+really.440.64-0ubuntu6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Dist-upgrade likewise led me to go back to fixing the broken install.

root@LesserArk:/home/sarah# apt dist-upgrade 
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-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.82+really.440.64-0ubuntu6) but it is not installed
                     Recommends: libnvidia-gl-440:i386 (= 440.82+really.440.64-0ubuntu6)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Not sure where to go from here. How can I restore my package system and install the nvidia driver?

Hardware:

sarah@LesserArk:~$ inxi -Fx
System:    Host: LesserArk Kernel: 5.4.0-31-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: KDE Plasma 5.18.5 
           Distro: Ubuntu 20.04 LTS (Focal Fossa) 
Machine:   Type: Laptop System: Hewlett-Packard product: HP ENVY 17 Notebook PC v: 097E110000405E00000620100 
           serial: <superuser/root required> 
           Mobo: Hewlett-Packard model: 1968 v: KBC Version 93.52 serial: <superuser/root required> UEFI: Insyde v: F.70 
           date: 10/20/2017 
Battery:   ID-1: BAT0 charge: 41.2 Wh condition: 41.2/41.2 Wh (100%) model: Hewlett-Packard Primary status: Full 
CPU:       Topology: Quad Core model: Intel Core i7-4702MQ bits: 64 type: MT MCP arch: Haswell rev: 3 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 35121 
           Speed: 2897 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 2897 2: 2895 3: 2894 4: 2907 5: 2912 6: 2936 7: 2894 
           8: 2895 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel 
           bus ID: 00:02.0 
           Device-2: NVIDIA GK107M [GeForce GT 750M] vendor: Hewlett-Packard driver: nvidia v: 390.132 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~75Hz 
           OpenGL: renderer: N/A v: N/A direct render: N/A 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:03.0 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.0-31-generic 
Network:   Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel port: 5000 bus ID: 07:00.0 
           IF: wlp7s0 state: up mac: e4:70:b8:f8:99:b8 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel 
           port: 3000 bus ID: 0f:00.0 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: a0:1d:48:fa:67:c0 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 3.21 TiB used: 1.18 TiB (36.8%) 
           ID-1: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: LITE-ON IT model: LMS-24L6M-HP size: 22.37 GiB 
           ID-3: /dev/sdc vendor: Seagate model: ST2000LM015-2E8174 size: 1.82 TiB 
           ID-4: /dev/sdd vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
           ID-5: /dev/sde type: USB vendor: SanDisk model: Gaming Xbox 360 size: 7.48 GiB 
           ID-6: /dev/sdf type: USB vendor: SanDisk model: U3 Cruzer Micro size: 1.91 GiB 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 bus ID: 00:1f.2 
Partition: ID-1: / size: 398.61 GiB used: 208.28 GiB (52.3%) fs: btrfs dev: /dev/sdd2 
           ID-2: /home size: 398.61 GiB used: 208.28 GiB (52.3%) fs: btrfs dev: /dev/sdd2 
           ID-3: swap-1 size: 14.90 GiB used: 221.5 MiB (1.5%) fs: swap dev: /dev/sdd3 
Sensors:   System Temperatures: cpu: 63.0 C mobo: 61.0 C gpu: nvidia temp: 57 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 468 Uptime: 10h 44m Memory: 15.57 GiB used: 10.78 GiB (69.2%) Init: systemd runlevel: 5 Compilers: 
           gcc: 9.3.0 Shell: bash v: 5.0.16 inxi: 3.0.38
0

2 Answers 2

1

If you not, try with “install third party software”. It solved my issue. It's the part of installation process. The Best way is to make a fresh new installation for ensure you get rid of broken install driver. In my case, this installed automatically proprietary drivers needed.

I tried everything and a lot of commands, but nothing works better.

enter image description here

It's also mentioned in official Ubuntu 20.04LTS documentation as" Know Issues " :

enter image description here

I also reccomand dislable "Secure boot" & enable "Legacy Boot" before fresh new installation. Hope this helps.

5
  • Where is the "install third party software" option though? It doesn't appear in my software center anywhere that I can find. :) May 29, 2020 at 0:50
  • It's a part of installation process. I redit my answer, so you can check in picture :)
    – Em Vo
    May 29, 2020 at 7:56
  • Ah, I did that and still ran into this issue. My system was installed with third party drivers. May 30, 2020 at 18:12
  • Did you disable " Secure Boot" and enable "Legacy Boot" in Bios ? Did you run a fresh new installation ? This process I mentioned is suggested in Ubuntu 20.04 documentation. You can check in Knowing Issues here " wiki.ubuntu.com/FocalFossa/…
    – Em Vo
    May 31, 2020 at 9:04
  • thank you, this helped me too. Nov 15, 2020 at 4:33
0

This might fix your problem : Open Up terminal CTR + ALT + T , then type the following commands :

sudo apt update && sudo apt upgrade

Then:

sudo apt autoremove

Then:

sudo apt install -f

Then:

sudo apt update --fix-missing

Then:

sudo dpkg --configure -a

Then:

sudo dpkg -l | grep ^..r

Then: sudo dpkg --remove --force-remove --reinstreq Then:

sudo apt clean
sudo apt update

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