I am trying to install M2Crypto on CentOS by compiling from the source. i am doing a python setup.py build But I get the following error,
/usr/local/lib/python
Follow Brian's instruction, and make sure you have install openssl-devel
. if you experience error like this:
./fedora_setup.sh build
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/include/python2.6 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf-i686.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf-i686.h'
error: command 'swig' failed with exit status 1
You are running i386 operating system on 64 bit hardware. arch =´uname -m´
will yields i686
. The easiest way is to work around this is to create a symbolic link.
sudo ln -s /usr/include/openssl/opensslconf-i386.h /usr/include/openssl/opensslconf-i686.h
Or if you experience errors like:
./fedora_setup.sh build
running build
running build_py
running build_ext
SWIG/_m2crypto_wrap.c:27555: error: ‘Swig_var__evp_err_set’ undeclared (first use in this function)
SWIG/_m2crypto_wrap.c:27564: error: ‘Swig_var__dh_err_get’ undeclared (first use in this function)
SWIG/_m2crypto_wrap.c:27564: error: ‘Swig_var__dh_err_set’ undeclared (first use in this function)
SWIG/_m2crypto_wrap.c:27576: error: ‘Swig_var__rsa_err_get’ undeclared (first use in this function)
...
Some headers are missing, just issue the following command and try again:
sudo yum install python-devel