0

I want to install CUDA on Ubuntu 20.04 and I used these commands to install CUDA (11.1.0) :

wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run

sudo sh cuda_11.1.0_455.23.05_linux.run

But after downloading to install it, it gives this error.

Error:

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

I try this command: /var/log/nvidia-installer.log

Result:

bash: /var/log/nvidia-installer.log: Permission denied

and this command is :

cat /var/log/cuda-installer.log

Result:

[INFO]: Driver not installed.
[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]: Initializing writeable menu [INFO]: Components to install: [INFO]: Driver [INFO]: 455.23.05 [INFO]: Executing NVIDIA-Linux-x86_64-455.23.05.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 455.23.05 failed, quitting

Please help me.

Sajadi
  • 103
  • 1
  • 5
  • 1
    Lots of answers here on installing CUDA. Get your Nvidia driver set up and working from the Ubuntu repos. Reject the offer of Nvidia driver from the .run script, and override all the system locations for lib installation. See https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu/1077063#1077063 https://askubuntu.com/questions/1219761/cuda-10-2-different-installation-paths/1244010#1244010 – ubfan1 Mar 30 '23 at 21:28
  • hi @ubfan1 , I saw your links and checked this link https://askubuntu.com/questions/1288672/how-do-you-install-cuda-11-on-ubuntu-20-10-and-verify-the-installation as well, but even though I went ahead, it still gives me an error to install. what should I do – Sajadi Mar 30 '23 at 22:47
  • 1
    What error did you get? In the .run script "options", did you override the library installation location? Some CUDA releases (11.8 and maybe earlier) hardwire in /usr/local as a location, but you can still move the cuda installation to where you want afterwards. I last installed by taking ownership of /usr/local, then running the script as myself (non-sudo), then moved the created cuda dir, and restored /usr/local ownership. Basically just copying files around, building nothing. You still need the PATH and LD_LIBRARY_PATH changes to your selected location. – ubfan1 Mar 30 '23 at 23:01
  • hi @ubfan1, The problem I noticed is that it can't install Cuda 11.1 and 11.3 drivers at all, but it can install Cuda itself. I installed it with this sudo apt install nvidia-driver-440command, but it still had a problem and it doesn't show Cuda with nvidia-smi command. – Sajadi Apr 01 '23 at 17:32
  • hi @ubfan1, I even went with this site and all its output was the same as this site, but the process failed for me in the last box. https://www.if-not-true-then-false.com/2021/install-nvidia-cuda-toolkit-on-ubuntu-debian-linux-mint/ – Sajadi Apr 01 '23 at 22:27
  • hi @ubfan1, I am working on a virtual machine, can this cause this problem? – Sajadi Apr 01 '23 at 22:32
  • Oh yes. I hear that the latest Nvidia drivers and cards can allow a passthru from the VM to the card, but I don't know anything about that, except that you need a dedicated card for the VM separate from the host's card. – ubfan1 Apr 02 '23 at 01:33

0 Answers0