WSL version of toolkit doesn't install nvcc, can't get cuda to work on WSL

I am new to this forum, please tell me if there is a more appropriate place to post my issue.

I’m trying to get my 3060 on a Windows laptop to work with WSL, following the instructions in CUDA on WSL :: CUDA Toolkit Documentation to install the cuda toolkit 11.7 without the linux drivers attached. I have downloaded and installed the latest windows drivers.

When I try to confirm installation in bash, the command “nvcc --version” returns Command ‘nvcc’ not found.

I then tried to install the toolkit via the runfile here CUDA Toolkit 11.7 Update 1 Downloads | NVIDIA Developer but it did not seem to help.

When I navigate to /usr/local/cuda-11.7/, I notice there is no “bin” folder.

I also tried to install cudnn. I suspect the cudnn errors I have are related to the cuda toolkit errors. I first followed Installation Guide :: NVIDIA Deep Learning cuDNN Documentation for the tar file installation, replacing /usr/local/cuda/ with /usr/local/cuda-11.7/ since …/cuda/ didn’t exist. If I remember correctly, I had to create the “lib64” and “include” directories myself.

It says to verify installation by make-ing something in the /usr/src/cudnn_samples_v8/ folder, but the only file in there is some generic license readme.txt from nvidia.

I then tried the package manager installation from the same tutorial with wsl-ubuntu as the OS, but nothing appeared to change.

in powershell:

wsl cat /proc/version

Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022

in wsl:

which nvcc
(returns no result)

$ ls /usr/local/cuda-11.7/
doc  extras  gds  include  lib64  targets

I am new to solving these kinds of problems, so if I’ve left out any critical information please tell me. If anyone can help me, I’d really appreciate it.

1 Like

Hello,

The package you have installed should have pulled nvcc. Considering this seems to have been ignored something might be not correctly installed or configured there in this particular setup.

As a quick work around I would recommend trying the runfile rather than the packaged based install and see if it works or if it prompts some more descriptive error messages:

Thanks !

Thank you very much for responding. The runfile installs nvcc and it gives me a version, so this may be the only thing I needed. A bit odd given what I tried before. I can’t yet confirm all my problems are solved because I ended up running out of hard drive space, and now I’m doing a complete reinstall of WSL to clean things up. I’ll be sure to post again once I’ve confirmed things are or aren’t working.

1 Like

It seems like this, and a misspelled addition to my PATH, were my only problems. Thanks again.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.