LoginSignup
5
5

More than 5 years have passed since last update.

brew install boost に失敗した場合の対処法

Last updated at Posted at 2014-05-08

brew install boost した時、以下のエラーを吐いてビルドが失敗した。

==> ./b2 --prefix=/usr/local/Cellar/boost/1.55.0_1 --libdir=/usr/local/Cellar/boost/
    cp "bin.v2/libs/wave/build/darwin-4.2.1/release/link-static/libboost_wave.a"  "/usr/local/Cellar/boost/1.55.0_1/lib/libboost_wave.a"

    ...failed updating 112 targets...
    ...skipped 20 targets...
    ...updated 12489 targets...

    READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

    These open issues may also help:
    Boost 1.55.0 fails to build --universal (https://github.com/Homebrew/homebrew/issues/26951)
    "bottle blocked by python requirement" is vague in boost 1.55.0_1 upgrade (https://github.com/Homebrew/homebrew/issues/28281)

どうやら Python まわりで問題が発生しているっぽい。

ここで対処法は2つある。Python support を捨てるか System Python を使うかである。

1. Python support を無効にする

デフォルトでは Python support を有効にした boost がインストールされることになっている。
しかし、そもそも他のパッケージの依存物として boost を入れるのなら、Python support は必要ないことがほとんどである。
Python support を無効化してインストールすれば良い。

$ brew install boost --without-python

2. System Python を使ってビルドする

エラーメッセージでググったところ、homebrew の Github リポジトリに issue が上がっていた
System Python(Mac に最初から入っているやつ)を使っていないのが原因とのこと。

自分は pyenv を使って Python 3.4.0 を常用する設定にしていたので失敗したのである。
System Python を使うよう設定を戻したのち、再インストールしたら成功した。

$ pyenv global system
$ pyenv rehash
$ brew install boost
5
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
5
5