2014-12-27 55 views
6

所有,Ubuntu的 - 試圖安裝Python Couchbase LIB - 「libcouchbase/couchbase.h:沒有這樣的文件或目錄」

我試圖安裝Python Couchbase的lib在我的Linux服務器,但它與失敗「libcouchbase/couchbase.h:沒有這樣的文件或目錄」。我也找不到包含couchbase.h文件的包。我怎樣才能解決這個問題?

 
[email protected]:~$ sudo easy_install couchbase 
Searching for couchbase 
Reading https://pypi.python.org/simple/couchbase/ 
Best match: couchbase 1.2.4 
Downloading https://pypi.python.org/packages/source/c/couchbase/couchbase-1.2.4.tar.gz#md5=4a51bf3ac1fa26bcb9433d53ac4ba34b 
Processing couchbase-1.2.4.tar.gz 
Writing /tmp/easy_install-ZF8OtY/couchbase-1.2.4/setup.cfg 
Running couchbase-1.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZF8OtY/couchbase-1.2.4/egg-dist-tmp-Az4Noq 
In file included from src/exceptions.c:17:0: 
src/pycbc.h:25:36: fatal error: libcouchbase/couchbase.h: No such file or directory 
#include 
            ^
compilation terminated. 
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 
[email protected]:~$ apt-file search couchbase.h 
python-celery-doc: /usr/share/doc/python-celery-doc/html/_modules/celery/backends/couchbase.html 
python-celery-doc: /usr/share/doc/python-celery-doc/html/internals/reference/celery.backends.couchbase.html 

回答

9

試試這個:http://docs.couchbase.com/couchbase-sdk-c-2.3/#downloading-the-couchbase-client-library

所以,如果你有Ubuntu的12.04:

  1. sudo wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list
  2. wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
  3. sudo apt-get update
  4. sudo apt-get install libcouchbase2-libevent libcouchbase-dev
+0

謝謝!完美工作。 – user43995 2014-12-27 19:58:36

+1

這在我的ubuntu14.04實例上適用於我。我所要做的就是將#1行更改爲'sudo wget -O/etc/apt/sources.list.d/couchbase.list http:// packages.couchbase.com/ubuntu/couchbase-ubuntu1404.list' – Abundnce10 2015-12-08 23:59:36

1

他們實際上寫了一個perl腳本,使安裝更容易,更安全,讓您可以:

  1. wget http://packages.couchbase.com/clients/c/couchbase-csdk-setup
  2. sudo perl couchbase-csdk-setup

正如所解釋的here

+0

腳本運行良好,但仍然無法找到軟件包錯誤。尚未提供Xenial的couchbase庫嗎? – 2018-01-15 00:21:29

相關問題