package libnvidia-gl-390 (not installed) failed to install/upgrade: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2 (NOT FIXED)

Bug #1768050 reported by NinePillars on 2018-04-30
86
This bug affects 19 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-390 (Ubuntu)
Undecided
Unassigned

Bug Description

There is a previous report, but I don't think this bug has been fixed, it is still there.

When I execute "sudo ubuntu-drivers autoinstall"

the driver does not installed. then I was told:

"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"

then I trace the bug and found it may be comes from libnvidia-gl-390 package and libnvidia-ifr1-390.

and When I try to install only the libnvidia-gl-390 package, I've got:

package libnvidia-gl-390 (not installed) failed to install/upgrade: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-390 (Ubuntu):
status: New → Confirmed
Van Stokes, Jr. (vstokes) wrote :

root@eerlon:~# 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-390 libnvidia-gl-390:i386
The following NEW packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/29.1 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 153905 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.48-0ubuntu3_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.48-0ubuntu3_i386.deb (--unpack):
 new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-390_390.48-0ubuntu3_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.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)
root@eerlon:~#

description: updated
description: updated
description: updated
Alexandre Lima (antuneslimarj) wrote :

I had the same problem and I solved with this solution:

As rootm run:

# for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do dpkg-divert --remove $FILE; done

Then:

# apt --fix-broken install

Font: https://askubuntu.com/questions/1035409/installing-nvidia-drivers-on-18-04

Best Regards!

I (farail) on 2018-10-13
Changed in nvidia-graphics-drivers-390 (Ubuntu):
assignee: nobody → I (farail)
assignee: I (farail) → nobody

Hi,
I also have this issue. But have not been able to solve it..
Is a newbie, so please forgive me if I do not provide all info first hand :)
Also I do not know where else to ask for help...

Have done as suggested, but still same issue. just I use nvidia-340.
Using:
Kubuntu 18.04 LTS
Dell E6410
suggested driver Nvidia-340 (default driver do not work with external monitor HDMI any more :( ).

The story. what have I done:
It started with the bug in Ubuntu 18.04 GL dispatch library.
I followed guides om the net and did:
sudo dpkg -P nvidia-340
sudo apt --fix-broken install
sudo apt remove nvidia-340
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
sudo apt autoremove

The update Finished OK

Then I tried to install new nvidia-340 as guided in https://askubuntu.com/questions/1077493/unable-to-install-nvidia-drivers-on-ubuntu-18-04
(adding ppa:graphics-drivers/ppa).
Did not work so removed PPA again and sudo dpkg -P nvidia-340

Later the new 340.107 driver was released in official PPA and I tried installing again..
Still the issue. I can not get the nvidia-340 drivers installed..

Get this failure (sorry I am Danish hope you can see the point any way):
Gør klar til at udpakke .../nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb ...
Tilføjer 'omdirigeret af /usr/lib/x86_64-linux-gnu/libGL.so.1 til /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib gennem nvidia-340'
dpkg-divert: fejl: omdøbning medfører overskrivning af '/usr/lib/x86_64-linux-gnu/libGL.so.1.distrib' med
  anden fil `/usr/lib/x86_64-linux-gnu/libGL.so.1', ikke tilladt
dpkg: fejl under behandling af arkivet /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb (--unpack):
 new nvidia-340 package pre-installation script subprocess returned error exit status 2
Der opstod fejl under behandlingen:
 /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb

So I tried your suggestions.. Not working for Me.

I see there have been some reports recently, but no one seems to take action..
(I have not done this) https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1797791

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1792790

https://bugs.launchpad.net/ubuntu/+source/libglvnd/+bug/1728352

Please suggest what I can do to get my nvidia drivers back :)

Thanks in advance
Br.

Yuri Gor (yuri-horus) wrote :

Alexandre Lima's suggestion works, but it needs to be adjusted in case of not an English locale.

Try

# for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do echo $FILE; done

first and choose the correct number for substring `{print $3}`

For example for Russian locale it will be $2:

# for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $2}'); do dpkg-divert --remove $FILE; done

Hi,
How do i find the right locale $x for DK ?

I cannot find $x no. Have looked:
https://unix.stackexchange.com/questions/111542/what-is-awk-print-10-45-2-3-file1-file2
https://www.shellhacks.com/linux-define-locale-language-settings/

output of $ "locale" is:
LANG=da_DK.UTF-8
LANGUAGE=
LC_CTYPE="da_DK.UTF-8"
LC_NUMERIC="da_DK.UTF-8"
LC_TIME="da_DK.UTF-8"
LC_COLLATE="da_DK.UTF-8"
LC_MONETARY="da_DK.UTF-8"
LC_MESSAGES="da_DK.UTF-8"
LC_PAPER="da_DK.UTF-8"
LC_NAME="da_DK.UTF-8"
LC_ADDRESS="da_DK.UTF-8"
LC_TELEPHONE="da_DK.UTF-8"
LC_MEASUREMENT="da_DK.UTF-8"
LC_IDENTIFICATION="da_DK.UTF-8"
LC_ALL=

Thanks for helping. I am really missing my nvidia drivers.

br.

Hi,
I can not get this to work..
The Bug must still be there.

Please help or point Me to the right place to get some help on this.
I need to gat nvidia driver to work and be able to use a external monitor :)

Thanks in advance

br.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers