CUDA Toolkit 11.1.0, Installation failed

vu flag

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


sudo sh

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


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

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


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

and this command is :

cat /var/log/cuda-installer.log


[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 --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.

cc flag
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
Sajadi avatar
vu flag
hi @ubfan1 , I saw your links and checked this link as well, but even though I went ahead, it still gives me an error to install. what should I do
cc flag
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.
Sajadi avatar
vu flag
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-440`command, but it still had a problem and it doesn't show Cuda with `nvidia-smi ` command.
Sajadi avatar
vu flag
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.
Sajadi avatar
vu flag
hi @ubfan1, I am working on a virtual machine, can this cause this problem?
cc flag
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.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.