一、安装新的cuda之前先卸载原来的:
sudo apt autoremove
sudo apt-get remove cuda*
二、安装cuda10.1
1、打开网页:https://developer.nvidia.com/cuda-toolkit-archive
选择自己想要的版本点击
2、
这里选择runfile模式安装,当然也可选择其它模式
先按提示下载.run文件:
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
3、安装步骤按照如下连接执行:https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#ubuntu-x86_64-deb
4、验证是否安装成功:
执行以下命令查看:cat /usr/local/cuda/version.txt