2014-02-18 54 views
8

我尝试安装蟒蛇couchbase,但我得到了以下错误:尝试安装Couchbase,用gcc命令失败,Python

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 

我安装了couchbase服务器和C库,并且我已经有:

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

那么,怎么了?

回答

18

您应该安装libcouchbase第一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 
1

什么Debian的喘息? libcouchbase2-libevent:取决于:libevent-1.4-2(> = 1.4.13-stable),但不可安装 libcouchbase2-core:取决于:libssl0.9.8(> = 0.9.8k-1),但它不可安装

0

如果libcoouchbase不在回购,克隆libcouchbase回购,并按照指示从那里进行安装:

sudo -H pip3 install couchbase 

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

最终从PIP安装Python库

相关问题