Installing SVN via MacPorts

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Wednesday, 23 January 2008

Following on from my previous article concerning using MacPorts to install system software easily on your Mac, in this article I'll guide you thru install Subversion and all it's dependencies under Apple's Leopard O/S.

Install MacPorts

Goto here and grab the latest MacPorts install image, it's got it's own installer so shouldn't be too much hassle to get going. Just takes a while configuring during the process.

Update MacPorts

Next with MacPorts installed update it's port list,

sudo port -v selfupdate

Perfect that should update the stock 1.5 build to the latest 1.6 release.

SVN Dependencies

Now to installing Subversion's dependencies, without these Subversion will not build. So in Terminal run...

sudo port install sqlite3
sudo port install apr-util
sudo port install neon

Excellent, you should now be ready to install Subversion 1.4.6 from source via MacPorts

Finally Subversion

Just run...

sudo port install subversion

Should install ok leaving you with the latest binary build of Subversion on your Apple machine.

What about a GUI ?

Ok, as most people don't really like using SVN from the command-line, you can download a mac gui interface to it at...

More MacPorts are available at...

Handy Tip

Before I go you can find out the location of a piece of software via the 'which' command.

which svn

Should return the path where it's installed.

Comments
  1. Rainer MüllerMonday, 09 February 2009
    MacPorts definitely does not come pre-installed with Leopard, you always need to install it yourself.
  2. John GriffithsTuesday, 10 February 2009
    Sorry, I stand corrected. Please accept my apologies, totally my mistake, of course it doesn't come pre-installed (must have been thinking Python).
  3. Mark LeBaySaturday, 07 March 2009
    I ran into some additional problems that required me to clean, uninstall and reinstall an upgrade for "apr" before I could install the upgrade for "apr-util" .

    To be thorough, I did the following:
    sudo port deactivate sqlite3
    sudo port clean --work sqlite3
    sudo port install sqlite3

    sudo port -f uninstall apr
    sudo port clean --all apr
    sudo port install apr

    sudo port clean --work apr-util
    sudo port -f uninstall apr-util
    sudo port install apr-util

    sudo port clean --work neon
    sudo port install neon

    sudo port clean --work subversion
    sudo port install subversion


    ---

  4. Amin Mohammed-ColemanTuesday, 17 March 2009
    Hi

    I am trying to use macport to install subversion but when I try to run the commands stated above I get the following:

    BLD-LON:~ amin$ sudo port install sqlite3
    ---> Configuring ncursesw
    Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncursesw/work/ncurses-5.7" && ./configure --prefix=/opt/local --enable-widec --disable-rpath --with-shared --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --mandir=/opt/local/share/man --with-manpage-format=normal " returned error 77
    Command output: checking for egrep... grep -E
    Configuring NCURSES 5.7 ABI 5 (Tue Mar 17 08:36:14 GMT 2009)
    checking build system type... i386-apple-darwin9.6.0
    checking host system type... i386-apple-darwin9.6.0
    checking target system type... i386-apple-darwin9.6.0
    Configuring for darwin9.6.0
    checking for prefix... /opt/local
    checking for gcc... /usr/bin/gcc-4.0
    checking for C compiler default output... configure: error: C compiler cannot create executables

    Error: The following dependencies failed to build: readline ncurses ncursesw
    Error: Status 1 encountered during processing.


    I am new to this so any help would be appreciated.

    Cheers

    Amin