找了很多答案终于解决了
引用一下官方的解答
http://us.download.nvidia.com/XFree86/Linux-x86_64/470.94/README/commonproblems.html
When I try to install the driver, the installer claims that X is running, even though I have exited X.
The installer detects the presence of an X server by checking for the X server’s lock files: /tmp/.Xn-lock, where ‘n’ is the number of the X Display (the installer checks for X Displays 0-7). If you have exited X, but one of these files has been left behind, then you will need to manually delete the lock file. Do not remove this file if X is still running!
就是说我退出了X但是锁文件还在,所以要把锁文件删除,但是一定要在X关闭的情况下删除。
首先按住ctrl+alt+F1 进入控制台
输入sudo /etc/init.d/lightdm stop
然后查看状态sudo /etc/init.d/lightdm status
这时候应该是inactive(dead)的状态
然后rm /tmp/.X*(可以先看一下是不是有/tmp/Xn-lock文件,n是一个0-7的数字)
再次cd 到.run文件所在目录
再次执行 sudo ./.run文件应该就能安装成功了
sudo /etc/init.d/lightdm start回到图形界面