OK let’s get back to the begining.
I have reinstalled debian 9, since it has crashed again after my last attempt.
I call NVIDIA-Linux-x86_64-390.25.run and the file NVIDIA-Linux-x86_64-390.25.run is has follow
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Feb 23 17:31:20 2018
installer version: 390.25
nvidia-installer command line:
Unable to load: nvidia-installer ncurses v6 user interface
Using: nvidia-installer ncurses user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> License accepted.
-> Installing NVIDIA driver version 390.25.
-> Performing CC sanity check with CC="/usr/bin/cc".
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I looked in the debian package, there is no ‘kernel-source’ but there is :
nvidia-driver - NVIDIA metapackage
nvidia-kernel-source - NVIDIA binary kernel module source
nvidia-vdpau-driver - Video Decode and Presentation API for Unix - NVIDIA driver
xserver-xorg-video-nvidia - NVIDIA binary Xorg driver
linux-source-4.9 - Linux kernel source for version 4.9 with Debian patches
linux-source - Linux kernel source (meta-package)
which one should I choose ?