Having trouble while installing NVIDIA Driver 340.101 in kali linux

this is the log file

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Sat Feb 11 17:39:05 2017
installer version: 340.101

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

nvidia-installer command line:
./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 340.101.
-> Performing CC sanity check with CC="/usr/bin/cc".
-> The CC version check failed:

You appear to be compiling the NVIDIA kernel module with a different compiler t$