简体   繁体   English

在我的Mac上安装pycrypto时出错

[英]Error installing pycrypto on my mac

I've tried using different solutions suggested to this problem but none seem to be working for me 我尝试使用针对此问题建议的其他解决方案,但似乎没有一个对我有用

I am trying to install pycrypto using pip install on my mac which I recently upgraded to 10.11 along with the latest Xcode as few people had suggested. 我试图在我的Mac上使用pip install安装pycrypto,最近有人将其升级到了10.11,以及最新的Xcode,很少有人建议。

But I am still getting clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang' failed with exit status 1 但是我仍然收到clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang' failed with exit status 1

Here is also the full error log am getting in the terminal any help greatly appreciated 这也是完整的错误日志正在终端中获得的任何帮助,我们将不胜感激

Failed to build pycrypto
Installing collected packages: pycrypto
  Running setup.py install for pycrypto
    Complete output from command /Users/flexmaster411/openchain/venv/bin/python2.7   -c "import setuptools,   tokenize;__file__='/private/var/folders/y4/kk3kmh9d47v8lk3lnd2k2vhr0000gn/T/pip-build-zTYGCp/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/y4/kk3kmh9d47v8lk3lnd2k2vhr0000gn/T/pip-mXfxhl-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/flexmaster411/openchain/venv/bin/../include/site/python2.7/pycrypto:
running install
running build
running build_py
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_fastmath.c -o build/temp.macosx-10.9-x86_64-2.7/src/_fastmath.o
src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                        else if (result < 0)
                                 ~~~~~~ ^ ~
src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                        else if (result < 0)
                                 ~~~~~~ ^ ~
2 warnings generated.
clang -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.9-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.9-x86_64-2.7/Crypto/PublicKey/_fastmath.so
ld: illegal text-relocation to '___gmp_binvert_limb_table' in /usr/local/lib/libgmp.a(mp_minv_tab.o) from '___gmpn_divexact_1' in /usr/local/lib/libgmp.a(dive_1.o) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1

I think this topic might help. 我认为这个主题可能会有所帮助。 That guy has the same issue: On Mac OS X, easy_install fabric and/or easy_install pycrypto fails due to linker error "illegal text-relocation" 那家伙有同样的问题: 在Mac OS X上,由于链接器错误“非法文本重定位”,easy_install结构和/或easy_install pycrypto失败。

You just need to install all necessary libraries. 您只需要安装所有必需的库。 I would suggest to use home brew http://brew.sh/ 我建议使用家庭酿造http://brew.sh/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM