Cuda installation fails, error code 256

Newbie here,

I’m trying to install cuda version 11.6 on my Ubuntu 18.04.6 using the runfile (local installation). However, installation fails. Checking through /var/log/cuda-installer.log, I see the following.

[INFO]: Driver not installed.
[INFO]: Checking compiler version…
[INFO]: gcc location: /usr/bin/gcc

[INFO]: gcc version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

[INFO]: Initializing menu
[INFO]: Setup complete
[INFO]: Components to install:
[INFO]: Driver
[INFO]: 510.39.01
[INFO]: Executing --ui=none --no-questions --$
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed.
[ERROR]: Install of 510.39.01 failed, quitting

When checking /var/log/nvidia-installer.log per ([INFO]: Finished with code: 256 , [ERROR]: Install of driver component failed).

nvidia-installer.log (37.5 KB)

If it’s useful,

$uname -r

$ lspci | grep nvidia -i
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f12 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10f9 (rev a1)
01:00.2 USB controller: NVIDIA Corporation Device 1ada (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1adb (rev a1)

Does anyone have any suggestions?

Thank you very much.