pip install m2crypto安装报错:opensslconf.h Error: CPP #error This openssl-devel package does not work your architecture

centos 7下,安装shadowsocks,提示需要m2crypto依赖包,M2Crypto is required to use aes-256-cfb, please run `apt-get install python-m2crypto`

通过pip安装之,但提示错误消息如下

[root@fsc tmp]# pip install m2crypto
Downloading/unpacking m2crypto
  Running setup.py egg_info for package m2crypto
    
Installing collected packages: m2crypto
  Running setup.py install for m2crypto
    building 'M2Crypto.__m2crypto' extension
    swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
    swig -python -I/usr/include/python2.7 -I/usr/include -I/usr/include/openssl -includeall -modern -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
    /usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.
    error: command 'swig' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-feng/m2crypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vpkm7l-record/install-record.txt --single-version-externally-managed:
    running install

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.7 -I/usr/include -I/usr/include/openssl -includeall -modern -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i

/usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.

error: command 'swig' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-feng/m2crypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vpkm7l-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-feng/m2crypto
Storing complete log in /root/.pip/pip.log

安装m2crypto后,再pip安装即可。

 




coded by nessus

发表评论

电子邮件地址不会被公开。

This site uses Akismet to reduce spam. Learn how your comment data is processed.