Installing CouchDB on Ubuntu: Problems and fixes
July 10, 2009 10 Comments
Got around to install CouchDB from source on a Ubuntu VM. CouchDB is schemaless “document” database server with a RESTful HTTP/JSON API. I’m mostly experimenting it with because of the schemaless design. The map/reduce views took a bit to get used to after being so well acustomed to SQL queries in the past, but I like what I see so far.
While installing it, I ran into a few problems:
Install Erlang(I was having trouble with the 64-bit erlang and openssl package, i ended up just using the 32 bit version):
sudo apt-get install build-essential erlang
First error message:
configure: error: Could not find the js library. Is the Mozilla SpiderMonkey library installed?
Uh oh, let’s install spidermonkey:
sudo add-apt-repository ppa:launchpad/ppa sudo apt-get install libmozjs-dev
Another error pops up:
checking for icu-config... no *** The icu-config script could not be found. Make sure it is *** in your path, and that taglib is properly installed. *** Or see http://ibm.com/software/globalization/icu/ configure: error: Library requirements (ICU) not met.
Oh no, international character support needed, install icu:
sudo apt-get install libicu-dev
And then another error appears:
checking for curl-config... no *** The curl-config script could not be found. Make sure it is *** in your path, and that curl is properly installed. *** Or see http://curl.haxx.se/ configure: error: Library requirements (curl) not met.
Hmm, curl needed:
sudo apt-get install libcurl4-openssl-dev
Now for Couchdb install commands (stolen from the couchdb wiki)
svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb cd couchdb ./bootstrap ./configure make sudo make install make clean make distclean sudo -i adduser --system --home /usr/local/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb chown -R couchdb:couchdb /usr/local/var/lib/couchdb chown -R couchdb:couchdb /usr/local/var/log/couchdb chown -R couchdb:couchdb /usr/local/var/run chown -R couchdb:couchdb /usr/local/etc/couchdb chmod -R 0770 /usr/local/var/lib/couchdb chmod -R 0770 /usr/local/var/log/couchdb chmod -R 0770 /usr/local/var/run chmod -R 0770 /usr/local/etc/couchdb cp /usr/local/etc/init.d/couchdb /etc/init.d/ update-rc.d couchdb defaults
Start it up with:
sudo /etc/init.d/couchdb start
CouchDB has a really great development community behind it. Subscribe to the mailing list, read the wiki, follow the couchdb twitter and read the book
Thanks, exactly what I needed!
Great Work, Tommy, was struggling with this overnight!
Pingback: 3wstudio» CouchDB II – Instalando CouchDB en Ubuntu
Thanks, exactly what I needed!
Does not work now as libmozjs-dev has been removed from the repository. Do the following to install libmozjs-dev:$ sudo add-apt-repository ppa:launchpad/ppa$ sudo apt-get updatelibmozjs-dev shows up in this repository
thanks for the update
Also, if the add-apt-repository command does not exist then:$ sudo apt-get install python-software-propertiesto get add-apt-repository
Great post, Tommy! You've saved a few of us from dependency hell on this one.
Thank you for this article, it saved me lot of pain.
Thanks for sharing dude. It only took 10 minutes to install couch because of you. You rock!