Mac OS X上的pycrypto安装失败 [英] pycrypto installation on Mac OS X failing
问题描述
我正在尝试通过运行以下命令在Mac OS X上安装pycrypto软件包:
I am trying to install pycrypto package on Mac OS X by running following command :
ARCHFLAGS=-Wno-error CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib sudo -E pip install pycrypto**
但是它失败并显示以下错误:
But it fails and show following error :
/usr/bin/clang -bundle -undefined dynamic_lookup -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -L/opt/local/lib -Wno错误 -L/opt/local/lib -I/opt/local/include -Wno-error build/temp.macosx-10.6-x86_64-3.4/src/_fastmath.o -lgmp -o build/lib.macosx-10.6-x86_64-3.4/Crypto/PublicKey/_fastmath.so
/usr/bin/clang -bundle -undefined dynamic_lookup -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -L/opt/local/lib -Wno-error -L/opt/local/lib -I/opt/local/include -Wno-error build/temp.macosx-10.6-x86_64-3.4/src/_fastmath.o -lgmp -o build/lib.macosx-10.6-x86_64-3.4/Crypto/PublicKey/_fastmath.so
ld:-lSystem找不到库
ld: library not found for -lSystem
clang:错误:链接器命令失败,退出代码为1(使用-v查看 调用)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
错误:命令'/usr/bin/clang'失败,退出状态为1
error: command '/usr/bin/clang' failed with exit status 1
推荐答案
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
对于上述错误,以下内容适用于优胜美地.
For the error above, the following works for me on Yosemite.
brew install gmp
export LIBRARY_PATH=/usr/local/lib
pip install pycrypto
这篇关于Mac OS X上的pycrypto安装失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!