繁体   English   中英

在Mac OS X上,由于链接器错误“非法文本重定位”,easy_install结构和/或easy_install pycrypto失败

[英]On Mac OS X, easy_install fabric and/or easy_install pycrypto fails due to linker error “illegal text-relocation”

当尝试easy_install fabric (或easy_install pycrypto ,哪个结构依赖)时,我在Mac OS X上遇到以下链接器错误:

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: Setup script exited with error: command 'clang' failed with exit status 1

我正在使用python的自定义安装,这显然与我的标准安装的libGMP不兼容。 从源代码构建libGMP(在我自己的前缀位置,由我的特殊python安装使用)修复了问题。

$ bunzip2 gmp-5.0.5.tar.bz2
$ tar -xf gmp-5.0.5.tar
$ cd gmp-5.0.5
$ ./configure --prefix=/path/to/my/special/prefix
$ make
$ make check
$ make install
$ easy_install pycrypto
$ easy_install fabric

暂无
暂无

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

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