简体   繁体   English

错误:命令“/usr/bin/clang”失败,退出代码为 1

[英]error: command '/usr/bin/clang' failed with exit code 1

I download a not commonly-used software package in github in Mac M1.我在Mac M1的github下载了一个不常用的软件package。 I am trying to compile and install myself according to the instruction.我正在尝试根据说明自行编译和安装。

I have encountered the following problem saying "command/usr/bin/clang with exits error 1".我遇到了以下问题,说“command/usr/bin/clang with exits error 1”。 I did install xcode in my mac.我确实在我的 mac 中安装了 xcode。 Because the built-in gcc version is 4.2, I upgrade the version using brew install gcc@7 command and the link to this gcc version.因为内置的gcc版本是4.2,所以我用brew install gcc@7命令和这个gcc版本的链接升级版本。 But I still face the same compiling problem.但我仍然面临同样的编译问题。

Does anyone have instructions for me how to solve this?有没有人指导我如何解决这个问题? The author did not maintain the source code anymore and I have struggled for one day and still can not fix the problem.作者没有再维护源码,折腾了一天也没有解决问题。

The follow steps worked!以下步骤有效!

  1. upgrade pip and related components by:通过以下方式升级 pip 和相关组件:
python -m pip install --upgrade pip
pip install –upgrade wheel 
pip install –upgrade setuptools
  1. install openssl安装 openssl
brew install openssl re2
  1. reinstall your package with some environment to be set重新安装 package 并设置一些环境
LDFLAGS="-L$(/opt/homebrew/bin/brew --prefix openssl)/lib -L$(/opt/homebrew/bin/brew --prefix re2)/lib" CPPFLAGS="-I$(/opt/homebrew/bin/brew --prefix openssl)/include -I$(/opt/homebrew/bin/brew --prefix re2)/include" GRPC_BUILD_WITH_BORING_SSL_ASM="" GRPC_PYTHON_BUILD_SYSTEM_RE2=true GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true pip install <your package name>

Source: https://candid.technology/error-command-usr-bin-clang-failed-with-exit-code-1/来源: https://candid.technology/error-command-usr-bin-clang-failed-with-exit-code-1/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:命令“/usr/bin/gcc”失败,退出代码为 1 - Error: command '/usr/bin/gcc' failed with exit code 1 命令“ / usr / bin / clang ++ -bundle -undefined…”失败,退出状态为1 - Command “/usr/bin/clang++ -bundle -undefined…” failed with exit status 1 OSX - #include "portaudio.h" 生成 1 个错误。 错误:命令“/usr/bin/clang”失败,退出状态为 1 - OSX - #include "portaudio.h" 1 error generated. error: command '/usr/bin/clang' failed with exit status 1 Mac OS 中的 Pip 安装错误(错误:命令“/usr/bin/clang”失败,退出状态为 1) - Pip install error in Mac OS(error: command '/usr/bin/clang' failed with exit status 1) mac osx 10.9.2上的mysql-python:错误:命令'/ usr / bin / clang'失败,退出状态为1 - mysql-python on mac osx 10.9.2: error: command '/usr/bin/clang' failed with exit status 1 无法在 macOS M1 13.0.1 上安装 Scrapy - lxml 安装错误:“/usr/bin/clang”失败,退出代码为 1 - Cannot install Scrapy on macOS M1 13.0.1 - lxml installation error: '/usr/bin/clang' failed with exit code 1 安装PyObjc时出错:命令'/ usr / bin / clang'失败 - Error installing PyObjc: command '/usr/bin/clang' failed / usr / bin / make失败,退出代码为2 - /usr/bin/make failed with exit code 2 pip3 install pgzero --- 导致命令“/usr/bin/gcc”失败,退出代码为 1(Python 3.9;macOS 10.15.7) - pip3 install pgzero --- leads to command '/usr/bin/gcc' failed with exit code 1 (Python 3.9; macOS 10.15.7) `pip install flask_mysqldb`由于clang失败:错误:链接器命令失败,退出代码为1 - `pip install flask_mysqldb` fails due to clang: error: linker command failed with exit code 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM