1

I need to install a programming software called cuda for my academic purpose. Googling how to install it on my Ubuntu 10.04, I found these and I have done that.

download the software
cd ~/Downloads 
sudo ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run

gedit ~/.bashrc

Add the following entries:

export CUDA_INSTALL_PATH=/usr/local/cuda 
export PATH=$CUDA_INSTALL_PATH/bin 

Save and exit. Then run on bash.

source ~/.bashrc

Now any command is not working saying: The command could not be located because '/bin' is not included in the PATH environment variable.

I can't understand as I am new to this. Can you please help me?

1 Answer 1

0

You should add the following entries:

CUDA_INSTALL_PATH="/usr/local/cuda" 
PATH="$PATH:$CUDA_INSTALL_PATH/bin"

You don't need export in front of PATH variable in .bashrc file (export makes the variable available to sub-processes). When you use PATH=$CUDA_INSTALL_PATH/bin you reassign to the PATH variable only $CUDA_INSTALL_PATH/bin value and you lose the previous value (...:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:...) which is absolutely necessary. You can check your PATH value in terminal with:

 echo $PATH

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .