3

我不是 C 程序员。任何想法这需要什么?

这是我尝试过的安装命令:

pip install paramiko
sudo pip install paramiko

输出:

src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]

                        else if (result < 0)

                                 ~~~~~~ ^ ~

src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]

                        else if (result < 0)

                                 ~~~~~~ ^ ~

2 warnings generated.

clang -bundle -undefined dynamic_lookup build/temp.macosx-10.8-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.8-x86_64-2.7/Crypto/PublicKey/_fastmath.so

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

----------------------------------------

Command /Users/Ceti/.pythonbrew/pythons/Python-2.7.3/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Rrbho6-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/pycrypto

Exception information:
Traceback (most recent call last):
  File "/Users/Ceti/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/Users/Ceti/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 271, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Users/Ceti/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1185, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Users/Ceti/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 592, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Users/Ceti/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/Ceti/.pythonbrew/pythons/Python-2.7.3/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Rrbho6-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/pycrypto
4

2 回答 2

7

在 CentOS/RHEL 6 中,“yum install python-devel”将解决这个问题。(您需要 Python 标头,以便可以安装 pycrypto。)

于 2014-05-14T16:46:09.953 回答
4

不知何故,这是一个顶级的谷歌结果,即使这个问题很可怕并且没有提出解决方案。对于我的设置,我在 debian 7 和 python 2.7 上安装 paramiko。

我通过安装 python-dev 为自己解决了这个问题:

aptitude install python-dev

我希望对遇到此错误消息的其他人有所帮助。

于 2014-03-20T22:17:11.170 回答