Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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