3

When trying to install cuda-10-2 which includes the 460 nivida driver, the following error appears.

INFO:Enable nvidia DEBUG:Parsing
/usr/share/ubuntu-drivers-common/quirks/dell_latitude DEBUG:Parsing
/usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad DEBUG:Parsing
/usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here Loading
new nvidia-460.32.03 DKMS files... Building for 5.4.0-64-generic
Building for architecture x86_64 Building initial module for
5.4.0-64-generic Error! Bad return status for module build on kernel: 5.4.0-64-generic (x86_64) Consult /var/lib/dkms/nvidia/460.32.03/build/make.log for more information.
Setting up nvidia-driver-460 (460.32.03-0ubuntu1) ...

It seems that the driver is incompatible with the kernel.

Hannu
  • 6,605
  • 1
  • 28
  • 45

1 Answers1

0

I could solve my problem doing this - removing all nvidia drivers, installing gcc-8 using this sequence of commands:

sudo apt-get autoremove --purge nvidia-*
sudo apt-get autoremove --purge nvidia-driver-*
sudo apt install gcc-8
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 10
sudo apt-get install --reinstall linux-headers-$(uname -r)
sudo apt-get install nvidia-driver-460
reboot