LoginSignup
5
0

More than 5 years have passed since last update.

:observer.start()するとERROR: Could not find 'wxe_driver.so'となる場合

Posted at

asdfでErlangをインストールしている場合に, observer を起動すると Could not find 'wxe_driver.so' となったときのお話。
今回は,ElixirのIExからobserverを呼んでますが,Erlangから erl -run observer と呼んでも同じ感じだと思います。

環境

  • macOS High Sierra 10.13.6
  • MacBook Pro (15-inch, 2018)
  • asdf 0.6.2
  • Erlang OTP 21
  • Elixir 1.7.4

エラー内容

iex(1)> :observer.start()
[error] ERROR: Could not find 'wxe_driver.so' in: /Users/zumin/.asdf/installs/erlang/21.0/lib/wx-1.8.4/priv

{:error,
 {{:load_driver, 'No driver found'},
  [
    {:wxe_server, :start, 1, [file: 'wxe_server.erl', line: 65]},
    {:wx, :new, 1, [file: 'wx.erl', line: 115]},
    {:observer_wx, :init, 1, [file: 'observer_wx.erl', line: 98]},
    {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 372]},
    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}
  ]}}

解決方法

$ brew install wxmac
$ asdf uninstall erlang 21.0
$ asdf install erlang 21.0

結論

wxWidgets がはいってないだけでした。
というわけで, wxWidgets を入れてErlangを再インストールしたら解決しました。

asdf-vm/asdf-erlang の Before install に wxmac 入れるように書いてありますね。 すっかり読み飛ばしてたみたいです。

brew から直接Erlangを入れたときは特に問題なかった気がするので, --with-wxmac オプションがデフォルトだったりするのかな?

5
0
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
0