LoginSignup
3
3

More than 5 years have passed since last update.

Elixirのbrew installでさっそくこけた

Last updated at Posted at 2017-03-11

Elixir初心者向けハンズオンでElixirに入門してみてます。

ちょっと前にhomebrewが壊れちゃってたみたいだったので修正対応したメモです。

(普通に僕の環境のhomebrewがおかしかっただけだと思うので参考になるか分からないですが)

$ brew install elixir
Updating Homebrew...
・
・
・
==> Installing dependencies for elixir: wxmac, erlang
Error: You must `brew link libpng libtiff` before wxmac can be installed

と出てこけました。 You must brew link libpng libtiffと出てるのでそのまま実行すると

$ brew link libpng libtiff
Linking /usr/local/Cellar/libpng/1.6.28...
Error: Could not symlink lib/pkgconfig/libpng.pc
/usr/local/lib/pkgconfig is not writable.

Homebrewのエラーを治す

などを参考に権限を直して

$ sudo chown $USER /usr/local/lib/pkgconfig

再実行すると

$ brew link libpng libtiff
Linking /usr/local/Cellar/libpng/1.6.28... 18 symlinks created
Linking /usr/local/Cellar/libtiff/4.0.7_2... 96 symlinks created

うまくいったっぽいのでもう一度チャレンジ

$ brew install elixir

・・・

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/aclocal/wxwin.m4
/usr/local/share/aclocal is not writable.

You can try again using:
  brew link wxmac

また同様のエラーがでたので権限などを修正

$ sudo chown $USER /usr/local/share/aclocal
$ brew link wxmac
Linking /usr/local/Cellar/wxmac/3.0.2_4... 74 symlinks created

再チャレンジ

$ brew install elixir

これでやっとインストールできました。

$ elixir --version
Erlang/OTP 19 [erts-8.2.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.4.2

まとめ

例のエラーがでたら

$ sudo chown $USER /usr/local/lib/pkgconfig
$ sudo chown $USER /usr/local/share/aclocal
$ brew link libpng libtiff
$ brew link wxmac

を実行してからbrew installすれば良さそう

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