Erlang Observer Broken on Ubuntu 24.04: [error] WX ERROR: Could not load library: :load_failed

Hey there,

Using the install script method recommended here on Ubuntu 24.04:

And then running the following commands:

iex> :observer.start()

Will lead this this error:

20:07:15.024 [error] WX ERROR: Could not load library: :load_failed
Failed to load NIF library /home/madvillain/.elixir-install/installs/otp/27.1.2/lib/wx-2.4.3/priv/wxe_driver: 'libwx_gtk3u_stc-3.2.so.0: cannot open shared object file: No such file or directory'
{:error,
 {{:error,
   {:load_failed,
    ~c"Failed to load NIF library /home/madvillain/.elixir-install/installs/otp/27.1.2/lib/wx-2.4.3/priv/wxe_driver: 'libwx_gtk3u_stc-3.2.so.0: cannot open shared object file: No such file or directory'"}},
  [
    {:wxe_server, :start, 1, [file: ~c"wxe_server.erl", line: 66]},
    {:wx, :new, 1, [file: ~c"wx.erl", line: 210]},
    {:observer_wx, :init, 1, [file: ~c"observer_wx.erl", line: 114]},
    {:wx_object, :init_it, 6, [file: ~c"wx_object.erl", line: 594]},
    {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 329]}
  ]}}

It looks like a missing system dependency but I am not sure what to install. Is this expected behaviour or a bug?

Try

3 Likes

Did you install?: libwxgtk-gl3.2-1t64

The asdf-erlang GitHub repo has a full list of dependencies required for everything to work when using Erlang. This should help prevent similar situations from occurring again in the future.

3 Likes

I love your OS username “madvillain”. I hope Elixir helps you take over the world!

Thanks - this fixed the issue right away. These dependencies aren’t included in the installer script - is there a reason why? Is it because that script is an MVP for getting Elixir working, but not for enabling all of Erlang?

Not sure. There’s quite a few dependencies that aren’t needed to install Erlang… maybe they just wanted to keep it simple. The Elixir onboarding experience has a few rough edges still…

If you mention it to whoever’s in charge of that page, you might be able to get it updated.

I would definitely recommend using asdf in general though. It makes it a lot easier to manage Elixir versions. It’s not always best to be on the bleeding edge version of Elixir… especially with the type system coming out. TBH you’re less likely to run into errors, probably just get some annoying warnings more often.

I find it is typically a good idea to work with the latest patch of the previous minor release, e.g. 1.17.3. Just to avoid any more rough edges than necessary.

We’re no longer friends. You are not recommending mise!

For real though, on pure technical merit, it wins. No shims, just PATH manipulation.

I gave it a shot, but I ended up sticking with asdf, mostly for reasons of “if it ain’t broke, don’t fix it”.

I’ll give it a shot again soon, but I’m just recommending the status quo. Not sure what edge cases will crop up for newcomers using the fancy new tech, although I don’t doubt that it’s objectively better. (Although these days, ASDF is likely to have issues since the Go rewrite…)

P.S. We’re still friends. :stuck_out_tongue:

1 Like

To me having extra 50-100ms on starting up an already interpreted runtime like the BEAM VM was a bridge too far.

Outside of that I do agree that you shouldn’t change what ain’t broken. But I am such a guy that I always look for something better.

2 Likes