Having trouble with the 340.96 driver on Kali Linux - failing CC version check

Hello! First post here and I’m already off to some technical difficulties :3

I’m currently trying to install the drivers for my GTX 285 on Kali, although I’m met with one problem after another. Unfortunately the drivers hiding in the repository via apt-get install nvidia-kernel packages aren’t compatible with my particular GPU and I’m advised to download the driver. This method seems to be a dead end as well - every time I’m met with “the compiler used to compile the kernel was gcc 5.4; the current compiler is gcc 6.1.”

I’ve attempted my best Google-fu skills but as of yet I’ve made no progress. None of the fixes I’ve found have had any effect and since I already uninstalled nouveau I’m getting tired of a 1280x720 display on a 1080p monitor :3 if anyone has any suggestions I’m all ears! Thanks :D

Here’s a link to the nvidia-installer.log file on my Dropbox - [url]Dropbox - nvidia-installer.log - Simplify your life

The error message is pretty explicit…

You shall always compile the Linux kernel and any module (Linux ones or third parties’) with the same gcc version. That’s because the ABI (i.e.how parameters are passed, or how the stack is laid out) changes between gcc versions, especially between major version changes (here, v5’s ABI is incompatible with V6’s).

So, either you recompile your kernel with gcc v6.1, or you install gcc v5.4, temporarily make it the default compiler and you recompile the NVIDIA modules with it.

You don’t need to change the default compiler; you can use the CC environment variable to override it when running the installer. E.g.,

CC=gcc-5.4 path/to/installer.run