Install CouchDB on Mac OS X (without using DarwinPorts)

The CouchDB installation instructions recommend using DarwinPorts for its dependencies. There is also a pre-built binary. If for one reason or another you don’t want to do either of those, here’s how to do it ‘by hand’.

install gettext

(Assuming libxml is installed like this)

  ./configure \
  sudo make install

install Locale::gettext

  sudo perl -MCPAN -e 'shell'
  cpan> install Locale::gettext

install help2man

  curl \
  patch -p0 <
  sudo make install

install ICU4C 4.x
  cd source
  chmod +x runConfigureICU configure install-sh
  ./runConfigureICU MacOSX
  sudo make install

install spidermonkey

(based on linux instructions, obsolete for 1.8.x and beyond)

  cd src
  make BUILD_OPT=1 -f Makefile.ref
  mkdir -p /usr/include/smjs/
  cp *.{h,tbl} /usr/include/smjs/
  cd Darwin_OPT.OBJ/
  cp *.h /usr/include/smjs/
  mkdir -p /usr/local/{bin,lib}/
  cp js /usr/local/bin/
  cp libjs.dylib /usr/local/lib/

install erlang

  sudo make install

install latest CouchDB

(should also work with a downloaded source distribution)

  svn co
  cd trunk
  ./configure \
    --with-js-include=/usr/include/smjs \
  sudo make install

Run CouchDB

  couchdb &

One thought on “Install CouchDB on Mac OS X (without using DarwinPorts)”

  1. Very useful. Works also with the latest libxml2-2.7.0 and CouchDB 0.9.1
    If you have the following Erlang Crash Dump upon startup

    {“init terminating in do_boot”,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}

    you’re running couchdb with incorrect permissions (see Error_messages section of official documentation)

Comments are closed.