I recently replaced linux Mint with the latest version of MINT20. I reinstalled CUDA that was running until then. During this time, I will record what I learned for later.
Linux Mint Linux Mint 20 MATE Hard GALLERIA DT (Dospara)
Install from the following page of Nvidia https://developer.nvidia.com/cuda-downloads
Linux -> x86_64 -> Ubunut -> 20.04 -> dev[network]
I copied and pasted it to the terminal according to the installation instructions displayed after this. It takes about 40 minutes
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
The installation went smoothly, but at the end I got the following message and stopped.
Your system has UEFI Secure Boot enabled.
UEFI Secure Boot requires additional configuration to work with third-party drivers.
As I scrolled and read, I was finally asked to enter the password. I was able to proceed by entering the same password that I set for linux twice. After that, the installation was finished immediately.
Then I rebooted. Then the screen display is strange. The image is displayed large. It seems that the screen settings have changed. Attempts to launch nvcc from the terminal are not recognized. So I restarted again. Then the screen size returned to normal. But nvcc doesn't start yet. When I run sudo apt-get -y install cuda again, I get a message that CUDA is already installed. The driver was also properly set by nvidia.
There was one last thing I had to do. This is the path setting. https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
$ export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}}
By inputting from the terminal like this, nvcc can be started.
Add the path setting to the end of the file called profile in your home directory. Now you can call nvcc from your terminal at any time.
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
Recommended Posts