Android Source problem

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Android Source problem

Postby mintgum on Thu Jan 03, 2013 1:31 pm

Hi, I want to download Android Source using these directions:
http://source.android.com/source/downloading.html
however, as I type the first line from the instructions - "mkdir ~/bin" , I get this message on the terminal:
-----------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 21, in <module>
os.execvp("python3", [sys.argv[0]] + sys.argv)
File "/usr/lib/python2.7/os.py", line 344, in execvp
_execvpe(file, args)
File "/usr/lib/python2.7/os.py", line 380, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
-----------------------------------------------------------------
I think I messed up Linux OS itself because the first time I tried this "mkdir ~/bin" it worked but I deleted the folder and tried to do it again with this error.. no idea what to do
appreciate any help, thanks
mintgum
Level 1
Level 1
 
Posts: 39
Joined: Sat Dec 22, 2012 3:52 pm

Linux Mint is funded by ads and donations.
 

Re: Android Source problem

Postby xenopeek on Thu Jan 03, 2013 4:38 pm

The problem is you have set the PATH variable to only include your Android directories. It normally includes a set of key system directories, so that when you run a system command, or some script runs a system command, you don't need to provide the full path to it.

Same problem as this user, so see there for a temporary fix: viewtopic.php?f=18&t=119561#p659089. Then undo whatever you have done to set the PATH variable. Then set it properly, as shown here: viewtopic.php?f=90&t=119804&p=660095#p660093
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Android Source problem

Postby mintgum on Fri Jan 04, 2013 4:41 am

Thanks for help, the problem was solved by itself after I did restart .(and also updated the system - forgot doing so after initial Linux installation)
But you also said something about setting PATH, and I did something like that, I followed the instructions on the Android website:
"mkdir ~/bin"
"PATH=~/bin:$PATH"
could this be the problem?
since I am a real beginner in Linux, can you explain what did "PATH=~/bin:$PATH" do and why do I need it?

about your topic of "Add default path settings at startup" - I really don't understand a thing there - (really really noob in Linux) :D
mintgum
Level 1
Level 1
 
Posts: 39
Joined: Sat Dec 22, 2012 3:52 pm

Re: Android Source problem

Postby xenopeek on Fri Jan 04, 2013 7:21 am

You don't need to do the "PATH=~/bin:$PATH" bit, though that is the right way to do it. Your .profile file already adds ~/bin to the PATH if this directory exists.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Android Source problem

Postby mintgum on Fri Jan 04, 2013 2:58 pm

Vincent Vermeulen wrote:You don't need to do the "PATH=~/bin:$PATH" bit, though that is the right way to do it. Your .profile file already adds ~/bin to the PATH if this directory exists.

can you explain what it is supposed to do ?
mintgum
Level 1
Level 1
 
Posts: 39
Joined: Sat Dec 22, 2012 3:52 pm

Re: Android Source problem

Postby xenopeek on Fri Jan 04, 2013 6:07 pm

Let's say you have a program called foobar, and you have it in the ~/bin directory. You could then run this program from the terminal, or call it from another program, just by writing:
Code: Select all
foobar

That is because ~/bin is in the PATH variable, and the system searches all the directories in the PATH variable for this program name. If ~/bin wasn't in the PATH, it would not be found by the system. To run the foobar program, you would have to give its full or relative path each time. So for example:
Code: Select all
~/bin/foobar

or:
Code: Select all
/home/yourusername/bin/foobar
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands


Return to Other topics

Who is online

Users browsing this forum: No registered users and 8 guests