在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"

查看:218
本文介绍了在Mac OS X上,由于链接器错误“非法文本重定位",easy_install结构和/或easy_install pycrypto失败.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试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的自定义安装,这显然与我的

I was using a custom install of python, which apparently wasn't compatible with my standard install of libGMP. Building libGMP from source (in my own prefix location, used by my special python install) fixed the problem.

$ 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

这篇关于在Mac OS X上,由于链接器错误“非法文本重定位",easy_install结构和/或easy_install pycrypto失败.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆