ubuntu16.04 安装nvidia驱动Error: you appear to be running an x server please exit x before installing

找了很多答案终于解决了
引用一下官方的解答

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回到图形界面

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值