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 \ --with-libxml2-prefix=/usr/local/libxml2-2.7.0 make sudo make install
install Locale::gettext
sudo perl -MCPAN -e 'shell' cpan> install Locale::gettext
install help2man
curl http://svn.macports.org/repository/macports/trunk/dports/textproc/help2man/files/patch-Makefile.in \ > patch-Makefile.in patch -p0 < patch-Makefile.in ./configure make sudo make install
install ICU4C 4.x
http://site.icu-project.org/ cd source chmod +x runConfigureICU configure install-sh ./runConfigureICU MacOSX make 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
./configure make sudo make install
install latest CouchDB
(should also work with a downloaded source distribution)
svn co http://svn.apache.org/repos/asf/couchdb/trunk cd trunk ./boostrap ./configure \ --with-js-include=/usr/include/smjs \ --with-js-lib=/usr/local/lib make sudo make install
Run CouchDB
couchdb & open http://127.0.0.1:5984/_utils/browse/index.html
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)