Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

im really new in linux and I have problem with set PATH variable to android. I download package from android site and unpacked it to workspace in my home directory. Then I run shell and go to my home directory and run command:

gedit .profile

Then I add to end of file lines:

export PATH=$PATH:~/workspace/android-sdk-linux/tools
export PATH=$PATH:~/workspace/android-sdk-linux/platform-tools

I save it, close terminal and start it again. When I run command:

./android

I get:

bash: ./android: There is no such file or directory

Do you know what I do wrong?

share|improve this question

migrated from stackoverflow.com Dec 10 '12 at 19:41

This question came from our site for professional and enthusiast programmers.

3  
Write those settings to .bashrc instead of .profile. It works for me. Also try without ./ only android. If that works do not modify .bashrc –  Aleksandar Dec 9 '12 at 15:44
    
Trick with .bashrc helps. Thank you very much :) –  AYMADA Dec 9 '12 at 16:01
    
You are welcome. –  Aleksandar Dec 9 '12 at 16:02

1 Answer 1

up vote 1 down vote accepted

You are using the wrong syntax to launch the program.

./something 

Refers explicitly to specifically to something in the current directory ("." means the current directory), so no path searching will be done. This form is typically used for programs which are infrequently needed, or just-compiled programs still in their compilation directory rather than a binary directory somewhere on the search path.

To run a command which is in a directory that is in your search path, you just use the command by itself, ie

android

Or more likely

android & 

so that it will release the terminal you start it from

Note that if you change your bash profile, it will not tend to take effect for the current session - easiest thing to do is to close that terminal window and open a new one, which will have a new instance of bash which has read the updated configuration.

(As an aside, your eclipse workspace directory, if that is what that is, is probably not where you want to install the android tools - most would put them somewhere such as ~/android or even system wide, such as /opt/android)

share|improve this answer

Your Answer

 
discard

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