stop x server to install nvidia driver
As the error states, you are still running an X server. This error occurs when you try to install the Nvidia .run files while logged in. Make sure you are logged out.1  Hit CTRL+ALT+F1 and login using your credentials. 2  kill your current X server session by typing sudo service lightdm stop or sudo stop lightdm. 3  Enter runlevel 3 by typing sudo init 3 and install your *.run file.4  You might be required to reboot when the installation finishes. had the same problem installing the driver for an old GeForce 9800 GT in Ubuntu 14.04-2. It was the NVIDIA-Linux-x86_64-340.76.run. I switched to the the tty1 using Ctrl+Alt+F1 and also stopped the service lightdm and when running the executable got the same error.