alistairphillips.com

I’m : a web and mobile developer based in the Manning Valley, Australia.


CouchDB on Mac OS X using MacPorts

CouchDB seems to generating quite a bit of interest lately so I thought I'd have a peek and see what it had to offer. The preferred way of installing CouchDB on OS X is using MacPorts:

    sudo port install couchdb
    ... trimmed output ...
    checking whether autoconf is recent enough... no
    configure: error: Autoconf 2.61a-341 or better is required.

An odd error as everything in my ports tree was updated. Googling for the error returned some results pointing to your current path being incorrect. I'd checked and the version of autoconf was 2.65 (my ~/.profile was fine) so it had to be something else. After a bit of hair pulling I discovered /opt/local/etc/macports/macports.conf which is what port uses for it's path. And what did I find in there?

    BEFORE:
    binpath     /Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

And then running /Developer/usr/bin/autoconf --version resulted in "autoconf (GNU Autoconf) 2.61" which was what was causing the error. A quick change later as follows:

    AFTER:
    binpath     /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Developer/usr/bin

and CouchDB was merrily installing away. If you'd like to set it up as a service do the following:

    # Run the following command to install the CouchDB launchd
    # startup item in order to start and re-start service automatically:
    sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist