一、安裝新的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