General Question

polycinco's avatar

How to install Subversion and GIT on a mac?

Asked by polycinco (187points) September 10th, 2012

I am trying to install Subversion and GIT on my mac because I want to use it with limejs. I believe I’ve installed it correctly but I keep getting this error in the terminal: -bash: svn: command not found
this happens with both SVN and GIT, is there something I’m missing or that I’m doing wrong?

Observing members: 0 Composing members: 0

11 Answers

gorillapaws's avatar

It could be that they aren’t in your unix path. See this article for adding something to your unix path.

polycinco's avatar

I believe you were right, I added that line of code to my terminal and now it gave me this : >

do I need to write something else after that?


polycinco's avatar

@gorillapaws I believe you were right, I added that line of code to my terminal and now it gave me this : >
do I need to write something else after that?

phaedryx's avatar

@polycinco how are you installing them? homebrew? macports?

An aside: I’ve been thinking about playing around with html5/canvas stuff. What makes limejs more compelling than any of the other frameworks out there?

abundantlife's avatar

Set your path to Unix only then they will install.

polycinco's avatar

@phaedryx I wasn’t using either of those or anything else, I enrolled in a course to make HTML5 games which requires Limejs GIT and subversion. I couldn’t tell you what the difference is between Limejs and others because I’m new to all of these and that’s why it’s being kind of hard to even install those things /:

polycinco's avatar

@abundantlife I believe I did that but would you mind guiding me through it?

phaedryx's avatar

@polycinco I personally like homebrew because it makes it really easy to install things (e.g. it automatically downloads and installs programs and creates symlinks so that they’ll be in your path).

You can read about it on their website, but the commands are pretty simple. Open up “Terminal” (you’ll need to type/copy the things I’ve bolded to the prompt).

1. Install homebrew:
ruby <(curl -fsSkL

2. install subversion:
brew install subversion

3. install git:
brew install git

4. switch to your home directory:

5. check out the limejs repository:
git clone git://

6. switch to the limejs directory you just made:
cd limejs

7. initialize:
bin/ init

8. Create a new project:
bin/ create helloworld

9. Open up ~/limejs/helloworld/helloworld.html in your browser and take a look

polycinco's avatar

@phaedryx Thank you so much! This is really helpful. I started with number 1 and got this on Terminal: Last login: Tue Sep 11 10:07:49 on ttys000
Cinthyas-MacBook-Pro:~ polycinco$ ruby <(curl -fsSkL
==> This script will install:

Press enter to continue
==> Downloading and Installing Homebrew…
/dev/fd/63:132:in `chdir’: Permission denied – /usr/local (Errno::EACCES)
from /dev/fd/63:132
Cinthyas-MacBook-Pro:~ polycinco$

Why does it say permission denied?

Thanks again!

phaedryx's avatar

I means that the user ‘polycinco’ on your system doesn’t have permissions to the ’/usr/local’ directory. You can see what the permissions are by typing:
ls -al /usr/|grep local
(it will give you the permissions string, a number, the name of the user who owns the directory, the name of the group who owns the directory, and some other info)

On my system I added my user to the ‘admin’ group, for you it would be:
sudo dseditgroup -o edit -a polycinco -t user admin

(it will probably prompt you for a password)

and make ’/usr/local’ group-writeable:
sudo chmod g+w /usr/local

and try going through my previous steps again.
If that doesn’t work for you, you can try installing it as the superuser:
sudo ruby <(curl -fsSkL
Or if all else fails, open permissions to /usr/local to everything before installing:
sudo chmod 777 /usr/local

but make sure to change it back when you’re done:
sudo chmod 755 /usr/local

polycinco's avatar

@phaedryx Thank you so much! I will try this and let you know what happens, hopefully this will fix it!

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther