aerospike / aerospike-client-python

Aerospike Python Client
Apache License 2.0
133 stars 110 forks source link

"pip install aerospike" failed to install python client #93

Closed prabakar2610 closed 8 years ago

prabakar2610 commented 8 years ago

I tried install Aerospike Python client in CentOS and it failed with the below error. I did google for the error and could not find one for RHEL family. It would be great if someone can help me with the installation.

[prabakar@pkr22 ~]$ python -V Python 2.6.6 [prabakar@pkr22 ~]$ cat /etc/redhat-release CentOS release 6.7 (Final) [prabakar@pkr22 ~]$

[prabakar@pkr22 ~]$ sudo pip install aerospike Collecting aerospike Using cached aerospike-1.0.56.tar.gz Installing collected packages: aerospike Running setup.py install for aerospike Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-Wml0Sc/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-_nEAp7-record/install-record.txt --single-version-externally-managed --compile: info: downloading 'http://www.aerospike.com/download/client/c/3.1.24/artifact/el6' to '/tmp/pip-build-Wml0Sc/aerospike/aerospike-client-c/package/aerospike-client-c.tgz' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18.1M 100 18.1M 0 0 30793 0 0:10:17 0:10:17 --:--:-- 29511 info: extracting 'aerospike-client-c-3.1.24.el6.x86_64/aerospike-client-c-devel-3.1.24-1.el6.x86_64.rpm' from 'aerospike-client-c.tgz' info: extracting files from 'aerospike-client-c-3.1.24.el6.x86_64/aerospike-client-c-devel-3.1.24-1.el6.x86_64.rpm' 13378 blocks

CHECK
   [✓] /tmp/pip-build-Wml0Sc/aerospike/aerospike-client-c/package/usr/lib/libaerospike.a
   [✓] /tmp/pip-build-Wml0Sc/aerospike/aerospike-client-c/package/usr/include/aerospike/aerospike.h
   [✓] /tmp/pip-build-Wml0Sc/aerospike/aerospike-client-c/package/opt/aerospike/client/sys/udf/lua/aerospike.lua

info: Executing ./scripts/aerospike-client-c.sh
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
copying from aerospike-client-c/lua to /usr/local/aerospike/lua
running install
running build
running build_ext
building 'aerospike' extension
creating build
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/src
creating build/temp.linux-x86_64-2.6/src/main
creating build/temp.linux-x86_64-2.6/src/main/client
creating build/temp.linux-x86_64-2.6/src/main/key
creating build/temp.linux-x86_64-2.6/src/main/query
creating build/temp.linux-x86_64-2.6/src/main/scan
creating build/temp.linux-x86_64-2.6/src/main/lstack
creating build/temp.linux-x86_64-2.6/src/main/lset
creating build/temp.linux-x86_64-2.6/src/main/llist
creating build/temp.linux-x86_64-2.6/src/main/lmap
creating build/temp.linux-x86_64-2.6/src/main/geospatial
creating build/temp.linux-x86_64-2.6/src/main/global_hosts
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/usr/include/python2.6 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.6/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -Wno-strict-prototypes -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-Wml0Sc/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-_nEAp7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Wml0Sc/aerospike [prabakar@pkr22 ~]$

rbotzer commented 8 years ago

Hi Prabakar. This is a CPython extension and requires build tools such as gcc. Also please look at the dependencies for CentOS.

prabakar2610 commented 8 years ago

Understood. I could see the installation checks for 3 files, if it could check for dependencies too then it can quit the installation process reporting the missing dependencies. This will help the user if they face any issue during installation.

rbotzer commented 8 years ago

Agreed. Internally this is JIRA issue CLIENT-393.