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

邮差的信 提交于 2019-11-27 08:12:00

问题


When trying to easy_installfabric (or easy_installpycrypto, which fabric depends on), I got the following linker error on 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

回答1:


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


来源:https://stackoverflow.com/questions/13937228/on-mac-os-x-easy-install-fabric-and-or-easy-install-pycrypto-fails-due-to-linke

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!