0

After installing CUDA 10.0 on Debian 9 Stretch, verifying the installation throws this error:

$ nvcc -V
$ No command 'nvcc' found

Why?

References: Debian CUDA Installation Guide

0

Solution: Permanently change PATH & LD_LIBRARY_PATH by editing the .bashrc file


Fix in 3 steps:

  1. Create .bashrc file in ~/home directory

$ cd ~/

$ sudo touch .bashrc

  1. Enter the file:

$ sudo gedit .bashrc


3. Scroll to the botton and add PATHs to the .bashrc file:

#CUDA Environment Setup
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Save File.

Reboot.

Open new terminal:

$   nvcc -V

Result:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

CUDA Toolkit Documentation Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.