Ansible 安装 -clang:错误:未知参数:'-mno-fused-madd' [英] Ansible Installation -clang: error: unknown argument: '-mno-fused-madd'

查看:23
本文介绍了Ansible 安装 -clang:错误:未知参数:'-mno-fused-madd'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我在这里发现了一些其他类似的叮当错误,但是,修复程序不适用于我的情况.

So, I've found some other clang error's on here that appear to be somewhat similar, however, the fixes aren't applicable to my situation.

我正在使用 OSX Mavericks,我们正在尝试安装 Ansible.我让 pip 正确安装,但是当我尝试安装 Ansible 时,我收到了这个叮当声错误.起初,我们认为这可能是版本问题,因此在使用 gcc49 出现相同错误后,我重新安装了 gcc46,但仍然出现错误.

I'm using OSX Mavericks and we're trying to get Ansible installed. I got pip to install correctly, but when I try to install Ansible, I get this clang error. We thought, at first, that it might be a version issue, so I re-installed gcc46 after having this same error with gcc49, but I'm still getting the error.

有人知道如何解决这个问题吗?

Does anyone know how to fix this?

我从 pip.log 日志文件中得到的完整错误报告如下:

My complete error report from the pip.log log file is as follows:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -Wall -Wstrict-prototypes -Wshorten-64-to-32 -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.9-intel-2.7/src/MD2.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_7evji-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pycrypto
Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_7evji-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pycrypto

感谢任何能帮助我解决这个问题的人.在过去的几个小时里,我们一直在尝试安装它,但它开始变得相当令人沮丧.

Thanks to anyone who can help me with this. We've spent the past several hours trying to get this to install, and it's starting to get fairly frustrating.

推荐答案

我最近在尝试安装不同的软件包时遇到了同样的问题.

I ran into the same problem recently while trying to install a different package.

在使用 pip 安装之前设置以下环境变量为我解决了这个问题:

Setting the following environment variables prior to installing with pip resolved the issue for me:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

如果您通过 sudo 安装,请不要忘记使用sudo -E",以便您的环境变量通过 sudo 传播.

If you're installing via sudo, don't forget to use "sudo -E" so that your environment variables propagate through sudo.

如果这对您不起作用,请尝试使用以下命令:

If that doesn't work for you, try the following command instead:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install ansible

或者,作为另一个潜在的解决方案,您可以尝试使用 Homebrew 重新编译新版本的 Python.

Alternatively, as yet another potential solution, you can attempt to recompile a fresh version of python using Homebrew.

参见这个问题了解更多信息.

希望这会有所帮助!

这篇关于Ansible 安装 -clang:错误:未知参数:'-mno-fused-madd'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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