Reputation: 43
Linux and programming noob here...
I'm following the instructions @ http://source.android.com/source/downloading.html I run into trouble when I run the following line:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
I get:
bash: /home/dev/bin/repo: Permission denied
And yes I've tried to sudo it.
Thank you! :)
================================================================================== EDIT:
I downloaded the script manually in a browser, popped-it into the home/dev/bin/ directory, and I am still unable to progress. Here is what my terminal window is giving me:
dev@Android-Dev:~$ sudo chmod a+x ~/bin/repo
[sudo] password for dev:
dev@Android-Dev:~$ cd /home/dev/bin/
dev@Android-Dev:~/bin$ sudo mkdir wip
dev@Android-Dev:~/bin$ cd wip
dev@Android-Dev:~/bin/wip$ repo init -u **<This is where the URL goes>**
fatal: cannot make .repo directory: Permission denied
dev@Android-Dev:~/bin/wip$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
dev@Android-Dev:~/bin/wip$ cd bin
bash: cd: bin: No such file or directory
dev@Android-Dev:~/bin/wip$ cd ..
dev@Android-Dev:~/bin$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
Upvotes: 3
Views: 22872
Reputation: 226
In CYGWIN you can do below.
.bash_profile
and uncomment these fields. (any text editor will do)# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
Under BASH, enter:
$ export PATH=$PATH:~/bin
Or add as follows to your .bashrc
file:
$ echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
If you are using CSH / TCSH, enter:
$ echo 'set PATH = ($PATH ~/bin /scripts/admin)' >> ~/.cshrc
To display path settings, enter:
$ echo $PATH
Upvotes: 1
Reputation: 21
I ran into the same problem. changing the ownership helped me. When I try to curl https..://myrepo...u...r...l../repo > ./repo
into my /opt/android dir
it gives me this error.
I do sudo chown -R shraddha /opt/android
that works
Upvotes: 2
Reputation: 1
The repo file is not executable. Run chmod a+x ~/bin/repo
to turn it into an executable file and this should fix your problem.
Upvotes: 0
Reputation: 1
you can try this: wget http://git-repo.googlecode.com/files/repo-1.14
After that, you can see the repo-1.14, and you can mv it to anywhere or change the name,such as : sudo mv repo-1.14 ~/bin/repo
Upvotes: 0
Reputation: 20936
Maybe you're behind a proxy? Try to download repo tool manually (just put this link into your browser). (I guess that maybe this resource can be prohibited for you). And then put it into this folder and assign permissions to it. I do not see any wrong steps in what you've described so far.
Upvotes: 0