mismatch on package

Asked by Jeroen Oudshoorn

LANG=C; sudo apt-get -f 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:
  linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic linux-image-4.15.0-32-generic linux-modules-4.15.0-32-generic
  linux-modules-extra-4.15.0-32-generic
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 upgraded, 2 newly installed, 0 to remove and 4 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] y
(Reading database ... 256831 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)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nvidia-graphics-drivers-390 Edit question
Assignee:
No assignee Edit question
Solved by:
Jeroen Oudshoorn
Solved:
Last query:
Last reply:

This question was originally filed as bug #1792790.

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#1

What to do next, I cannot update my desktop.

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

For diagnostic purposes, what is the output of the commands

uname -a
lsb_release -crid
sudo dpkg --audit
dpkg -l | grep nvidia
ls -l /usr/lib/i386-linux-gnu/libGL.*

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#3

uname -a
Linux Jeroen 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#4

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#5

dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 libnvidia-ifr1-390:amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
 libnvidia-ifr1-390:i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
 nvidia-driver-390 NVIDIA driver metapackage

The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
 libc-bin GNU C Library: Binaries

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#6

dpkg -l | grep nvidia
ii libnvidia-cfg1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-390 390.48-0ubuntu3 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-390:amd64 390.48-0ubuntu3 amd64 NVIDIA libcompute package
ii libnvidia-compute-390:i386 390.48-0ubuntu3 i386 NVIDIA libcompute package
ii libnvidia-decode-390:amd64 390.48-0ubuntu3 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-390:i386 390.48-0ubuntu3 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-390:amd64 390.48-0ubuntu3 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-390:i386 390.48-0ubuntu3 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-390:i386 390.48-0ubuntu3 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
iU libnvidia-ifr1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
iU libnvidia-ifr1-390:i386 390.48-0ubuntu3 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
rc nvidia-367 375.82-0ubuntu3 amd64 Transitional package for nvidia-375
rc nvidia-375 384.111-0ubuntu1 amd64 Transitional package for nvidia-384
rc nvidia-384 390.48-0ubuntu3 amd64 Transitional package for nvidia-driver-390
ii nvidia-compute-utils-390 390.48-0ubuntu3 amd64 NVIDIA compute utilities
ii nvidia-dkms-390 390.48-0ubuntu3 amd64 NVIDIA DKMS package
iU nvidia-driver-390 390.48-0ubuntu3 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-390 390.48-0ubuntu3 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-390 390.48-0ubuntu3 amd64 NVIDIA kernel source package
rc nvidia-opencl-icd-340 340.106-0ubuntu3 amd64 NVIDIA OpenCL ICD
rc nvidia-opencl-icd-367 375.39-0ubuntu0.16.04.1 amd64 Transitional package for nvidia-opencl-icd-375
rc nvidia-opencl-icd-375 384.90-0ubuntu3 amd64 Transitional package for nvidia-opencl-icd-384
rc nvidia-opencl-icd-384 390.48-0ubuntu3 amd64 Transitional package for nvidia-headless-390
ii nvidia-prime 0.8.8 all Tools to enable NVIDIA's Prime
ii nvidia-settings 390.42-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-390 390.48-0ubuntu3 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-390 390.48-0ubuntu3 amd64 NVIDIA binary Xorg driver

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#7

ls -l /usr/lib/i386-linux-gnu/libGL.*
lrwxrwxrwx 1 root root 14 Aug 29 10:25 /usr/lib/i386-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 390680 Jun 5 16:16 /usr/lib/i386-linux-gnu/libGL.so.1.0.0
lrwxrwxrwx 1 root root 14 Jun 5 16:16 /usr/lib/i386-linux-gnu/libGL.so.1.distrib -> libGL.so.1.0.0

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

What is the output of:

apt-cache policy libnvidia-cfg1-390 nvidia-390; lsb_release -a

Thanks

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#10

libnvidia-cfg1-390:
  Installed: 390.48-0ubuntu3
  Candidate: 390.48-0ubuntu3
  Version table:
 *** 390.48-0ubuntu3 500
        500 http://nl.archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
        100 /var/lib/dpkg/status
nvidia-390:
  Installed: (none)
  Candidate: (none)
  Version table:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

You should do a clean-up of the old nvidia packages:

sudo dpkg --purge nvidia-367 nvidia-375 nvidia-384 nvidia-opencl-icd-340 nvidia-opencl-icd-367 nvidia-opencl-icd-375 nvidia-opencl-icd-384

if this does not help, I suggest deleting the offending link
sudo rm /usr/lib/i386-linux-gnu/libGL.so.1.distrib

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#12

Ok, so I did both you said. And it still isn't solved.

Revision history for this message
Jeroen Oudshoorn (jayofelony) said :
#13

sudo apt-get remove libnvidia-ifr1-390 libnvidia-ifr1-390:i386 nvidia-driver-390
followed by
sudo apt-get update && sudo apt-get dist-upgrade

This is the solution.