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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mintgum

Android Source problem

Post by mintgum »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Android Source problem

Post by xenopeek »

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: http://forums.linuxmint.com/viewtopic.p ... 61#p659089. Then undo whatever you have done to set the PATH variable. Then set it properly, as shown here: http://forums.linuxmint.com/viewtopic.p ... 95#p660093
Image
mintgum

Re: Android Source problem

Post by mintgum »

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
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Android Source problem

Post by xenopeek »

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.
Image
mintgum

Re: Android Source problem

Post by mintgum »

xenopeek 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 ?
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Android Source problem

Post by xenopeek »

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
Image
Locked

Return to “Other topics”