On my old PC I have a fresh installation of Kali Linux 2.0. It has Nvidia GeForece 8400 GS installed. I have followed the instructions provide on the forum here and from the kali linux docs here but still I'm getting following errors when trying to install using the driver run file downloaded from the Nvidia website.

ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 340.104 -k 4.14.0-kali1-686-pae`:
         Kernel preparation unnecessary for this kernel.  Skipping...
         Building module:       
         cleaning build area...                                                                                              
         make -j2 KERNELRELEASE=4.14.0-kali1-686-pae module KERNEL_UNAME=4.14.0-kali1-686-pae; make -C uvm module
         KERNEL_UNAME=4.14.0-kali1-686-pae KBUILD_EXTMOD=/var/lib/dkms/nvidia/340.104/build/uvm.................(bad exit    
         status: 2)
         Error! Bad return status for module build on kernel: 4.14.0-kali1-686-pae (i686)
         Consult /var/lib/dkms/nvidia/340.104/build/make.log for more information.
Please help and do let me know if any other detail is required from end. I am stuck on this since yesterday.