swig unable to find openssl conf

2020-02-29 11:09发布

Trying to install m2crypto and getting these errors, can anyone help ?

SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'

5条回答
beautiful°
2楼-- · 2020-02-29 11:22

@gordon33 reply is good, but if you don't have root (e.g. Travis-CI), you can also add option to pip install that will tell it to pass the options to build environment and compiler options:

pip install --global-option=build_ext --global-option="-I/usr/include/x86_64-linux-gnu" m2crypto

查看更多
男人必须洒脱
3楼-- · 2020-02-29 11:27
ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h

Just made this and everything worked fine.

查看更多
Luminary・发光体
4楼-- · 2020-02-29 11:29

Installing libssl-dev (which contains development libraries, header files) will solve the issue.

sudo apt-get install libssl-dev
查看更多
聊天终结者
5楼-- · 2020-02-29 11:30

On CentOS or RHEL, run the following to install OpenSSL development libraries and headers:

# yum install openssl-devel 
查看更多
你好瞎i
6楼-- · 2020-02-29 11:43

This was a bug in M2Crypto, fixed in at least 0.25.1. The particular commit is ecc678d52e6525f9e3278a7cedfa110a64244937.

查看更多
登录 后发表回答