Search code examples
python-2.7centos7kyotocabinet

Unable to install kyotocabinet command 'gcc' failed with exit status 1


Trying to install kyotocabinet using pip install kyoto cabinet but it always throw this error, I already have already installed all the packages like

sudo yum install python-devel
sudo yum install libevent-devel
sudo yum -y install gcc gcc-c++ kernel-devel
sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel

But still not able to install this package it always fails with same error

pip install kyotocabinet
Collecting kyotocabinet
  Using cached kyotocabinet-1.10.tar.gz
Installing collected packages: kyotocabinet
  Running setup.py install for kyotocabinet ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7jpcR9/kyotocabinet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-WXUqOO-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'kyotocabinet' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include -I/usr/include/python2.7 -c kyotocabinet2.cc -o build/temp.linux-x86_64-2.7/kyotocabinet2.o
    kyotocabinet2.cc:16:22: fatal error: kcpolydb.h: No such file or directory
     #include <kcpolydb.h>
                          ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7jpcR9/kyotocabinet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-WXUqOO-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7jpcR9/kyotocabinet/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Any help would be appreciated thanks!


Solution

  • Fixed the issue by installing Kyotocabinet from this link

    http://skipperkongen.dk/2013/02/14/giving-kyotocabinet-a-go/

    hope it helps other users