我目前正在尝试安装pycrypto,当我执行python setup.py build时,我收到以下错误:
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.9-intel-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 'cc' failed with exit status 1
我已经尝试重新安装命令行工具并删除旧的Xcode实例。
任何帮助都是非常感谢的
发布于 2014-03-15 22:23:21
这对我很有效。(如果你使用的是Xcode 5.1,应该可以工作)
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pycrypto
发布于 2014-04-05 00:54:25
这为我做到了:
sudo port install gmp
sudo ln -s /opt/local/lib/libgmp.dylib /usr/lib/libgmp.dylib
ARCHFLAGS=-Wno-error CFLAGS=-I/opt/local/include sudo -E pip install pycrypto
发布于 2013-10-31 00:38:22
我遇到了同样的问题,并能够通过安装gmp来解决它:
brew install gmp
然后,我nuked我的构建目录,并重新开始pycrypto安装,它成功了。
这还修复了pycrypto的配置脚本过程中的警告消息:
warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath
https://stackoverflow.com/questions/19617686
复制相似问题