在CentOS上安装M2Crypto时遇到问题

0 投票
1 回答
4638 浏览
提问于 2025-04-18 00:42

当我运行 pip install M2Crypto 时,出现了以下错误:

/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

我尝试了这里的一个解决办法 (https://stackoverflow.com/a/7855209/828584),但是当我用“build”来运行脚本时,又出现了这个错误:

gcc: error trying to exec 'as': execvp: Permission denied

有没有办法解决这两个错误,或者有没有其他方法可以安装 M2Crypto?

1 个回答

4

我找到另一个答案,链接在这里:https://stackoverflow.com/a/4380239/289192

试试这个命令:

env SWIG_FEATURES="-cpperraswarn -includeall -D__`uname -m`__ -I/usr/include/openssl" pip install M2Crypto 

撰写回答