Ubantu system cuda upgrade to the specified version

1. First check the cuda version supported by your own driver, enter in the command line

nvidia-smi

11.4 on the upper right side shows that the driver 470 can install the highest version of cuda

            

2. Check the version supported by cuda on the nvidia official website . Find the download path

I found the installation for 11.3. Select runfile(local) to automatically generate download commands

 

Execute on the command line, the download is a bit slow, wait patiently.....

wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run

Then execute the run command

sudo sh cuda_11.3.0_465.19.01_linux.run

Then install step by step, select continue

Enter accept 

 Here I did not choose the 465 driver, because I already have this driver. select install

 After that, an error will be reported. Click to view the reason for the error, which is related to the 465 driver. 

 Installation failed. See log at /var/log/cuda-installer.log for details.

install of 465 failed. There should be two ways at this time, one is to return to the above step and select the driver; the other is what I want to teach you. You can directly [additional drive] 

[INFO]: Driver installation detected by command: apt list --installed | grep -e nvidia-driver-[0-9][0-9][0-9] -e nvidia-[0-9][0-9][0-9]
[INFO]: Cleaning up window
[INFO]: Complete
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc

[INFO]: gcc version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 

[INFO]: Initializing menu
[INFO]: Setup complete
[INFO]: Components to install: 
[INFO]: Driver
[INFO]: 465.19.01
[INFO]: Executing NVIDIA-Linux-x86_64-465.19.01.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed.
[ERROR]: Install of 465.19.01 failed, quitting

In [Software and Updates] - [Additional Drivers], check if there is a 465. If there is, select it, if not, you still have to go back to the previous step and select the driver.

 Hey, I will fail to install 465 here. I ended up choosing NVIDIA SERVER DRIVER 470 Proprietary. This can be installed successfully. Then, go back and execute sudo sh cuda_11.3.0_465.19.01_linux.run to find that the upgrade is successful.

Guess you like

Origin blog.csdn.net/SandyoneU1993/article/details/124758972