- libevent (or libev) for the primary I/O backend.
- openssl for SSL transport.
- CMake version 2.8.9 or greater (for building)
- gcc C compiler
$ git clone git://github.com/couchbase/libcouchbase.git $ cd libcouchbase && mkdir build && cd build $ ../cmake/configure $ make $ ctest
$ git clone https://github.com/json-c/json-c.git $ mkdir json-c-build $ cd json-c-build $ cmake ../json-c
$ make $ make install
If your system has pkgconfig, then you can just add this to your makefile:
CFLAGS +=
Install Couchbase 7.0 build with a test bucket with a single document to start with
test1:: { "a": 1, "b": 2, "c": "xyz" }
Compile using options (the path points to the install location of the json-c library) gcc -I /usr/local/include -L /usr/local/lib -lcouchbase n1ql.c -o n1ql -ljson-c
Run with options couchbase:///<bucket_name> username password ./n1ql couchbase://localhost/test Administrator password