When DKMS uses clang
to compile the nvidia
kernel driver, you're boned.
sudo modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': Exec format error
Unfortunately, dkms
doesn't take CC
and CXX
settings from the environment.
sudo update-alternatives --config cc
sudo update-alternatives --config c++
sudo dkms remove nvidia/390.48 -k 4.15.0-32-generic
sudo dkms build nvidia/390.48 -k 4.15.0-32-generic
sudo dkms install nvidia/390.48
sudo modprobe nvidia
And reboot.
I've been tearing my hair out for days with this. Thanks!