正是申請季高峰,但還是被老師抓着干活。之前一直以為cuda已經裝好,才知道是騙自己的。我的顯卡是640,ubuntu14.4, 比較low。
我是按照這個教程走的,http://m.blog.csdn.net/article/details?id=51882183,當走到sudo sh cuda_7.5.18_linux.run這步時,出現了一個bug:
An NVIDIA kernel module 'nvidia' appears to already be loaded in your
kernel. This may be because it is in use (for example, by the X
server), but may also happen if your kernel was configured without
support for module unloading. Please be sure you have exited X
before attempting to upgrade your driver. If you have exited X, know
that your kernel supports module unloading, and still receive this
message, then an error may have occured that has corrupted the NVIDIA
kernel module's usage count; the simplest remedy is to reboot your
computer.
當時就懵了,sudo service lightdm stop 肯定能把X Server關閉了,那第二個可能性就可能是罪魁禍首啦,an error may have occured that has corrupted the NVIDIA kernel module's usage count。
大概意思就是跟NVIDIA有關,要刪除以前舊的驅動,然后裝新驅動,其實我也是半知半解,但我找到了一個帖子解決了 我的問題
http://askubuntu.com/questions/830916/how-to-install-cuda-8-0-on-ubuntu-16-04-with-nvidia-geforce-gtx-1080
關鍵的命令:
sudo apt-get purge nvidia-cuda*
sudo apt-get purge nvidia-*
詳情參考帖子原文。
由於時間很緊,寫的比較亂,由於每個人的配置不盡相同,能用這個方法解決當然最好,不行的話,也不能勉強。