Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

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

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...