1.卸载本机原有驱动,因为 通常ubuntu或者debian都是来自社区的驱动,并不是英伟达的官方驱动

如何完全 卸载 nvidia驱动
http://forums.debian.net/viewtopic.php?f=10&t=55518

aptitude purge ~i~nnvidia

2.从官网下载对应显卡驱动程序,进行安装

安装详见:
http://blog.csdn.net/dark5669/article/details/53157718
卸载英伟达驱动

nvidia-uninstall //即可

3.从官网下载 cuda 8.0

直接安装 即可
.run类型
直接运行.run文件
.deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda

注意:在安装的过程中可能会出现,gcc 版本过高的问题,那么我们就需要,对gcc 降级:
1) 安装gcc/g++版本为4.9.x

    sudo apt-get install  gcc-4.9
    sudo apt-get install  g++-4.9

2)链接gcc/g++实cd /usr/bin

sudo rm gcc

sudo ln -s gcc-4.9 gcc

sudo rm g++

sudo ln -s g++-4.9 g++

4.cuda 环境变量配置

export PATH=/usr/local/cuda-8.0/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH

5.如果出现 环境变量配置错误问题

应急

在命令行中输入:export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

则参考

http://blog.csdn.net/lancees/article/details/8031750

6. Uninstallation

To uninstall the CUDA Toolkit, run the uninstallation script provided in the bin 
directory of the toolkit. By default, it is located in /usr/local/cuda-8.0/bin:
**$ sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl**

To uninstall the NVIDIA Driver, run nvidia-uninstall:
**$ sudo /usr/bin/nvidia-uninstall**

Use the following commands to uninstall a RPM/Deb installation:

$ sudo yum remove <package_name>                      //Redhat/CentOS

$ sudo dnf remove <package_name>                      // Fedora

$ sudo zypper remove <package_name>                   // OpenSUSE/SLES

$ sudo apt-get --purge remove <package_name>          // Ubuntu

Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ixzz4Z0rvSqpI
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐