9
9

More than 5 years have passed since last update.

homebrew の upgrade や reinstall が libc++ の件で全くすすまないとき。

Last updated at Posted at 2013-10-23

OSを更新したことが原因か不明だが、brew upgrade で以下のようなメッセージが出た。

$ brew reinstall avidemux
Error: avidemux dependency libvpx was built with the following
C++ standard library: libstdc++ (from clang)

This is incompatible with the standard library being used
to build avidemux: libc++ (from clang)

Please reinstall libvpx using a compatible compiler.
hint: Check https://github.com/mxcl/homebrew/wiki/C++-Standard-Libraries

メッセージにしたがって brew reinstall をやっていたが、
思いのほか沢山あったので以下のようパイプを使って brew reinstall を実行するようにした。

$ brew reinstall avidemux 2>&1 | grep "Please reinstall" | awk '{print "brew reinstall",$3}'| sh

それでも面倒臭くなったので最終的には以下のようにした。

while brew reinstall avidemux 2>&1 | grep "Please reinstall" > /tmp/result.txt
do
  $(awk '{print "brew reinstall",$3}' /tmp/result.txt) 
done

終了条件がちょっと不安だけど、多分これで無事に reinstall されるはず

9
9
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
9
9