Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在Mac OS X上,easy“u-install fabric和/或easy“u-install pycrypto由于链接器错误而失败”;“非法文本重新定位”;_Python_Macos_Fabric_Pycrypto - Fatal编程技术网

Python 在Mac OS X上,easy“u-install fabric和/或easy“u-install pycrypto由于链接器错误而失败”;“非法文本重新定位”;

Python 在Mac OS X上,easy“u-install fabric和/或easy“u-install pycrypto由于链接器错误而失败”;“非法文本重新定位”;,python,macos,fabric,pycrypto,Python,Macos,Fabric,Pycrypto,尝试easy\u install(或easy\u install,结构取决于哪个)时,我在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 c

尝试
easy\u install
(或
easy\u install
,结构取决于哪个)时,我在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(在我自己的前缀位置,由我的特殊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

这非常有效,谢谢!我在执行
pip install fabric
时也遇到了“非法文本重新定位到uuuu gmp\u binvert\u limb\u表”的问题。请注意,./configure的--prefix选项是。。。可选。没有./configure也能正常工作。奇怪的是,我的解决方案正好相反:
brew取消gmp链接
——之后我可以成功地
sudo-pip安装pycrypto