8

I try to install couchbase for python, but I get the following error:

building 'couchbase._libcouchbase' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/src
creating build/temp.linux-i686-2.7/src/viewrow
creating build/temp.linux-i686-2.7/src/contrib
creating build/temp.linux-i686-2.7/src/contrib/jsonsl
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -    fPIC -I/usr/include/python2.7 -c src/exceptions.c -o build/temp.linux-i686-2.7/src/exceptions.o
In file included from src/exceptions.c:17:0:
src/pycbc.h:25:36: fatal error: libcouchbase/couchbase.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

I installed the couchbase server and the c library, and I already had:

sudo apt-get install build-essential # for a C compiler
sudo apt-get install python-dev

So what's wrong ?

DaveR
  • 9,540
  • 3
  • 39
  • 58
user3156971
  • 1,095
  • 2
  • 15
  • 17

3 Answers3

18

You should install libcouchbase first http://www.couchbase.com/communities/c/getting-started

wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add - 
sudo wget -O/etc/apt/sources.list.d/couchbase.list \
    http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list
sudo apt-get update
sudo apt-get install libcouchbase2-libevent libcouchbase-dev
avsej
  • 3,822
  • 4
  • 26
  • 31
1

What about debian wheezy? libcouchbase2-libevent: Depends: libevent-1.4-2 (>= 1.4.13-stable) but it is not installable libcouchbase2-core : Depends: libssl0.9.8 (>= 0.9.8k-1) but it is not installable

dragonfly
  • 168
  • 1
  • 13
0

If libcoouchbase is not in the repo, clone the libcouchbase repo and follow the instructions from there to install it:

$ git clone git://github.com/couchbase/libcouchbase.git
$ cd libcouchbase && mkdir build && cd build
$ ../cmake/configure
$ make
$ sudo make install

In the end install the python library from pip:

sudo -H pip3 install couchbase
Razvan Tudorica
  • 475
  • 5
  • 13