依赖文件里M2Crypto安装报错
原因:缺少一些系统包没有安装
注:一定要是openssl@1.1 !!!我因为之前默认是openssl@3导致报了很多奇奇怪怪的错误
brew install openssl@1.1
brew install swig
brew install gcc
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
brew unlink swig && brew link swig
此时安装M2Crypto, 如果报以下错误:error: command ‘/usr/local/bin/swig’ failed with exit code 1
原因:build时候报错,需要指定openssl和swig的路径,执行以下命令
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" pip install M2Crypto==0.35.2
安装成功,撒花~~~
yum install -y python-devel gcc gcc-c++ make openssl-devel
pip install M2Crypto==0.35.2