Issue installing nvidia-465 on Ubuntu 18.04

I faced this error when attempting to install nvidia-465 on Ubuntu 18.04

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  nvidia-465
The following NEW packages will be installed:
  nvidia-465
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
3 not fully installed or removed.
Need to get 246 MB of archives.
After this operation, 681 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  nvidia-465 465.19.01-0ubuntu1 [246 MB]
Fetched 246 MB in 6s (44.1 MB/s)
(Reading database ... 167281 files and directories currently installed.)
Preparing to unpack .../nvidia-465_465.19.01-0ubuntu1_amd64.deb ...
Unpacking nvidia-465 (465.19.01-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-465_465.19.01-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package libglx-mesa0:amd64 20.0.8-0ubuntu1~18.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-465_465.19.01-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

To resolve this, run

sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken

Leave a Reply

Your email address will not be published. Required fields are marked *