1、打开cuda-toolkit 网站
CUDA Toolkit Archive | NVIDIA Developer
根据自己需要选择CUDA Toolkit版本,这里选择12.0.0

2、点击链接跳转到下载页面,选择操作系统类型和安装包类型
3、下载CUDA Toolkit 安装包

4、执行下载命令
wget https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run
5、执行安装命令
sudo sh cuda_12.0.0_525.60.13_linux.run
#如果提醒无权限执行
#chmod +x cuda_12.0.0_525.60.13_linux.run
6、安装过程可能遇到的错误解决方案
#Failed to verify gcc version. See log at /var/log/cuda-installer.log for details.
gcc --version
sudo apt install gcc
#ERROR: Unable to find the development tool `make` in your path; please make sure that you have the package 'make' installed. If make is installed on your system, then please check that `make` is in your PATH.
#安装工具make
sudo apt install build-essential
7、查看驱动安装情况
nvidia-smi
执行命令后出现如下信息说明驱动已安装成功。
