LoginSignup
7
5

More than 3 years have passed since last update.

【エラー対処】error command 'clang' failed with exit status 1が発生する

Posted at

はじめに

pythonでreppyというライブラリをpipインストールしたとき、

error command 'clang' failed with exit status 1

が発生しました。

本当はもっと上にエラーコードがありましたが、ログを取り忘れてしまいました。
申し訳ありません。

環境はMacでPythonのpip時のエラーになります。

対処法

CFLAGS=-stdlib=libc++ pip install reppy
env CFLAGS=-stdlib=libc++ pip install reppy

bashを使っている人は上の方を
fishを使っている人は下の方を実行します。

fishではイコールで変数に代入を行わないためです。
しかし、envコマンドを使えば環境変数を設定しながら、別のコマンドを実行できます。

reppyでは、C++のMakefileを使用しているため、CFLAGSの環境変数が間違っているとどうやらエラーが出るようです。
そのため、以上のように指定することで、きちんとコンパイルしてくれます。

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5