sudo apt install nvidia-340
Reading package lists... Done
Building dependency tree
Reading state information... Done
nvidia-340 is already the newest version (340.108-0ubuntu5.20.04.2).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nvidia-340 (340.108-0ubuntu5.20.04.2) ...
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Removing old nvidia-340-340.108 DKMS files...
------------------------------
Deleting module version: 340.108
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-38-generic
Building for architecture x86_64
Building initial module for 5.11.0-38-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-340.0
.crash'
Error! Bad return status for module build on kernel: 5.11.0-38-generic (x86_6
4)
Consult /var/lib/dkms/nvidia-340/340.108/build/make.log for more information.
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned er
ror exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-38-generic
I: The initramfs will attempt to resume from /dev/sda3
I: (UUID=90b33171-feea-47a1-b878-cc2c86316379)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)