Couldn't start observer: Failed to load NIF library .../.asdf/installs/erlang/24.0.4/lib/wx-2.0.1/priv/wxe_driver.so

Hi,

I’m trying to start an observer for my elixir app, but I’ve received an error:

Interactive Elixir (1.13.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start

20:24:40.917 [error] WX ERROR: Could not load library: :load_failed
Failed to load NIF library: 'dlopen(/Users/yoonwaiyan/.asdf/installs/erlang/24.0.4/lib/wx-2.0.1/priv/wxe_driver.so, 2): Symbol not found: __ZN10wxListbook12SetImageListEP11wxImageList
  Referenced from: /Users/yoonwaiyan/.asdf/installs/erlang/24.0.4/lib/wx-2.0.1/priv/wxe_driver.so
  Expected in: flat namespace
 in /Users/yoonwaiyan/.asdf/installs/erlang/24.0.4/lib/wx-2.0.1/priv/wxe_driver.so'

I’m using macOS Big Sur with elixir/OTP installed with asdf. Appreciate any help :pray:

1 Like

This is just a guess on my part, but make sure you have installed all of the required dependencies before you do asdf install erlang <version>.

Have a look at the OSX section of the Erlang plugin README. It may provide you some help:

1 Like

The reason is that Erlang was installed before installing wxwidgets. It works now after some complication in having erlang to compile properly after installing wxwidgets.