sudo apt install libnvidia-gl-396
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed
libnvidia-gl-396
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
Need to get 16,6 MB of archives.
After this operation, 84,3 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 libnvidia-gl-396 amd64 396.54-0ubuntu0~gpu18.04.1 [16,6 MB]
Fetched 16,6 MB in 37s (448 kB/s)
(Reading database ... 962164 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-396_396.54-0ubuntu0~gpu18.04.1_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-396'
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-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
new libnvidia-gl-396:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-gl-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)