cuda install woes

nvidia driver rabbithole - ‘kernel configuration is invalid’

I have been having some trouble installing an nvidia driver for a K80 gpu on an ubuntu 14.04 headless machine.    I tried several install methods (local .deb, local runfile, remote .deb, apt-get install of nvidia packages, and adding a ppa) and none succesfully allow communication with the gpu.

None of these have succeeded. An example is the following error (from the remote .deb attempt)

root@brain2:~# uname -a
    Linux brain2 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

root@brain2:~# lspci|grep -i nvidia
    83:00.0 3D controller: NVIDIA Corporation Device 102d (rev a1)
    84:00.0 3D controller: NVIDIA Corporation Device 102d (rev a1)

root@brain2:~# sudo apt-get install linux-headers-$(uname -r)
    ...0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@brain2:~#  more /var/lib/dkms/nvidia/352.79/build/make.log
    DKMS make.log for nvidia-352.79 for kernel 3.13.0-74-generic (x86_64)
    Mon Feb  8 06:31:43 CST 2016
    NVIDIA: calling KBUILD...
    make[1]: Entering directory `/usr/src/linux-headers-3.13.0-74-generic'
    test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
        echo >&2;                            \
        echo >&2 "  ERROR: Kernel configuration is invalid.";        \
        echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
        echo >&2 ;                            \
        /bin/false)

I don’t have this problem when installing 352.79 driver(runfile) on my Ubuntu14.04.3_x64/Tesla K80 systems.
Can you post the full information in nvidia-installer.log, it could be generated after driver runfile installation.