pip install salt返回'clang:错误:未知参数:'-mno-fused-madd'[-Wunused命令行参数参数硬错误在将来] [英] pip install salt returns 'clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

查看:90
本文介绍了pip install salt返回'clang:错误:未知参数:'-mno-fused-madd'[-Wunused命令行参数参数硬错误在将来]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OSX上.我要按照Salt的官方指南此处来安装Salt,遇到了问题.运行"sudo pip install salt"会出现以下错误.

I'm on OSX. I'm installing Salt by following Salt's official guide here and I've ran into a problem. Running 'sudo pip install salt' gives me the following error.

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

我将整个安装文本放在此要点中.我只想通过pip安装盐.有什么想法吗?

I put the entire installation text in this gist. I just want to install salt via pip. Any ideas?

其他溢出问题尝试使用的解决方案

  1. 我尝试了 export CFLAGS = -Qunused-参数 export CPPFLAGS = -Qunused-参数 在sudo bash中
  2. 我尝试使用 ARCHFLAGS =-Wno-error = unused-command-line-argument-hard-error-in-future"运行sudo pip install salt
  3. 将xcode从5.1更新到5.1.1,因为我读到这可能是xcode问题.
  1. I've tried export CFLAGS=-Qunused-arguments and export CPPFLAGS=-Qunused-arguments in sudo bash
  2. I've tried running sudo pip install salt with ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
  3. Updating xcode from 5.1 to 5.1.1, as I read this might be an xcode problem.

所有这些都返回相同的确切错误.我不知道该怎么办.我已经无奈地将头撞在这堵墙上了大约2个小时.有人可以帮忙吗?

All of these return the same exact error. I don't know what to do. I've been hitting my head against this wall for about 2 hours with no resolve. Can someone help please?

推荐答案

尝试将环境变量赋值放在sudo之后:

Try putting the environmental variable assignment after sudo:

sudo ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" pip install gdal

或者,成为root用户,然后执行导出:

Or, become root, then do the export:

sudo su - 
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" install gdal
pip install ...

看来sudo命令不会继承环境变量,并且肯定不会使用sudo在多个运行中保存它们:

It appears that the sudo command does not inherit the environmental variables, and they certainly aren't saved across multiple runs with sudo:

$ export  ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
$ sudo printenv | grep ARCHFLAGS
$ 

这篇关于pip install salt返回'clang:错误:未知参数:'-mno-fused-madd'[-Wunused命令行参数参数硬错误在将来]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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