ERROR: Could not find 'wxe_driver.so'

maxximiliann@Maxximiliann:$ iex -S mix
Erlang/OTP 22 [erts-10.7.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [

Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)


iex(1)> :observer.start

12:45:30.511 [error] ERROR: Could not find 'wxe_driver.so' in: /home/maxximiliann/.asdf/installs/erlang/22.3.3/lib/wx-1.9/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: 107]},
{:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 372]},
{:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}
]}}

These instructions were followed to install erlang-wx on this Ubuntu machine:

Operating System: Ubuntu 20.04.1 LTS
Kernel: Linux 5.4.0-48-generic
Architecture: x86-64

What else is required to get observer to run?

That linked article contradicts your error message, as that article does use system Erlang while you use an asdf managed Erlang.

Please identify the ex development headers for your platform, install them and then reinstall Erlang using asdf.

Thanks for the prompt response :slight_smile:

If you could please clarify, how exactly do I do this?

I am an intermediate-level coder (IMHO) but for what it’s worth I tried installing every wx lib I could find on a Ubuntu 20 machine about 7 months ago and even though it was clearly on the PATH (I could import in a c file), the asdf erlang install would not find it. I’m not offering any advice or solution, just saying I faced this same problem and spent 3 days solid trying to fix it. Now I do all elixir/erlang dev on a Mac. :stuck_out_tongue:
If you find a way to install eralng with wx on Ubuntu please post it here. Thanks.

2 Likes

You might check that You have installed those packages before installing Erlang with asdf…

$ sudo apt-get -y install build-essential autoconf m4 libncurses5-dev 
libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev 
libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

I have a working observer on Ubuntu 20.04, but I am on Erlang 23.1, and Elixir 1.10.4

1 Like
maxximiliann@Maxximiliann:~$ sudo apt-get -y install build-essential autoconf m4 libncurses5-dev 
[sudo] password for maxximiliann: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
autoconf is already the newest version (2.69-11.1).
build-essential is already the newest version (12.8ubuntu1).
libncurses5-dev is already the newest version (6.2-0ubuntu2).
m4 is already the newest version (1.4.18-4).
m4 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Thank you for your suggestion. What else should I try?

You missed the rest of the line…

It is one full command, like this

$ sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

I just made some breaklines for readability.

BTW You might find preinstall requirement on this page.

Thank you for clarifying :slight_smile:

After following your recommendation here’s what came up:

maxximiliann@Maxximiliann:~/ iex -S mix
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

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

(Erlang:400596): Gtk-WARNING **: 18:02:12.703: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)
                                                                         :ok
iex(2)>

Is this typical behavior or am I missing something else?

Did You update your mix file? It should contains…

extra_applications: [:logger, :runtime_tools, :os_mon, :observer, :wx]

:runtime and :os_mon are for live dashboard, but You need the 2 last.

defmodule Arbit.MixProject do
	use Mix.Project

	def project do
		[
			app: :arbit,
			version: "0.1.0",
			elixir: "~> 1.10.1",
			start_permanent: Mix.env() == :prod,
			deps: deps()
		]
	end


	def application do
		[
			extra_applications: [:logger, :export, :runtime_tools, :os_mon, :observer, :wx],
			mod: {Arbit.Application, []}
		]
	end


	defp deps do
		[
			{:httpoison, "~> 1.7.0"},
			{:postgrex, "~> 0.15.5"},
			{:ecto_sql, "~> 3.4.5"},
			{:gen_stage, "~> 1.0.0"},
			{:jason, "~> 1.2.1"},
			{:export, "~> 0.1.0"},
			{:erlport, "~> 0.10.1"},
			{:puid, "~> 1.1.1"},
			{:poolboy, "~> 1.5.2"}
		]
	end
end
maxximiliann@Maxximiliann:~/Desktop/Arbit$ iex -S mix
Erlang/OTP 23 [erts-11.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

2020-09-29 02:00:57.531840Z- Initiating Arbit 

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

(Erlang:510790): Gtk-WARNING **: 20:01:12.492: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)
                                                                         :ok
iex(2)>

The error persists . . .

I also have the same warnings, but observer starts correctly.

Oh, ok. Thanks so much for everything! :slight_smile:

Along with the solution @kokolegorille provided, you may find this explanation here quite helpful.

Thanks I will look at this if I am installing on Ubuntu in the future :+1: