更新NVIDIA显卡的CUDA驱动出错,You appear to be running an X server; please exit X before

来源:互联网 发布:百川软件怎么样 编辑:程序博客网 时间:2024/06/01 23:14

(一)错误信息:

You appear to be running an X server; please exit X before...


原来,更新驱动需要关闭图形桌面。赶紧查看一下,是不是真的有X:

ps aux | grep X

看到

$ ps aux | grep Xroot      2242  1.6  0.0 154212 35820 tty7     Ss+  04:10   0:01 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitchcc    4677  0.0  0.0  11284  1016 pts/8    S+   04:11   0:00 grep --color=auto X

(二)关闭X的方式有两种:

(1)gdm类型的桌面系统

sudo /etc/init.d/gdm stopsudo /etc/init.d/gdm status
(2)light类型的桌面系统

sudo /etc/init.d/lightdm stopsudo /etc/init.d/lightdm status

关闭后,ps看下,的确看不到X了,但是,又有个新的Error:

An NVIDIA kernel module 'nvidia-uvm' appears to already be loaded in your ke...

(三)卸载旧的驱动

#关键的命令:sudo apt-get purge nvidia-cuda*sudo apt-get purge nvidia-*

(四)再次安装新驱动,终于OK了!



阅读全文
0 0
原创粉丝点击