6

I'm running Kubuntu 15.04 64-bit and trying to get Erlang's 18.1 'debugger' or 'observer' to run (EDIT: from within the shell):

observer:start().
debugger:start().

I get the following error:

{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,96}]},
     {wx_object,init_it,6,[{file,"wx_object.erl"},{line,337}]},
     {proc_lib,init_p_do_apply,3,
               [{file,"proc_lib.erl"},{line,240}]}]}}

ERROR REPORT==== 4-Oct-2015::15:34:01 ===
ERROR: Could not find 'wxe_driver.so' in: /home/howler/erlang/18.1/lib/wx-1.5/priv

I've tried various forums and have followed the prescribed advice concerning wxWidgets but I still can't get it to work?

Does anyone know of a definitive way to solve this problem?

  • How is Erlang installed? From source or via packages? – Adam Lindberg Oct 04 '15 at 15:27
  • I've tried from both kerl and by source. From source - nothing more clever than ./configure, ./make, and then ./make install –  Oct 04 '15 at 16:12
  • 1
    I use erlang solutions repository and it works ok. I believe you should prefer repository version if you are not sure why don't want it. – Lol4t0 Oct 04 '15 at 18:06

3 Answers3

3

Easy Way

Adding repository For Erlang Solutions repository using following commands:

wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb

Install Erlang:

sudo apt-get update
sudo apt-get install erlang

Test run run erl and call wx:demo()

λ VIDIA ~ → erl
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

local .erlang loaded
Eshell V7.1  (abort with ^G)
1> wx:demo().
ok
<0.35.0> Closing window 
2> 

Build From Source

apt-get update

Install the build tools (dpkg-dev g++ gcc libc6-dev make)

apt-get -y install build-essential

automatic configure script builder (debianutils m4 perl)

apt-get -y install autoconf

Needed for HiPE (native code) support, but already installed by autoconf

apt-get -y install m4

Needed for terminal handling (libc-dev libncurses5 libtinfo-dev libtinfo5 ncurses-bin)

apt-get -y install libncurses5-dev

For building with wxWidgets

apt-get -y install libwxgtk2.8-dev libgl1-mesa-dev libglu1-mesa-dev libpng3

For building ssl (libssh-4 libssl-dev zlib1g-dev)

apt-get -y install libssh-dev

ODBC support (libltdl3-dev odbcinst1debian2 unixodbc)

apt-get -y install unixodbc-dev

Get Erlang/OTP source files

mkdir -p ~/code/erlang
cd ~/code/erlang
wget http://www.erlang.org/download/otp_src_18.0.tar.gz
tar -xvzf otp_src_18.0.tar.gz
chmod -R 777 otp_src_18.0
cd otp_src_18.0
./configure
make
make install
exit 0

Steps From Bryan Hunter shell script gist

byaruhaf
  • 4,128
  • 2
  • 32
  • 50
  • Works like a charm. It turns out I didn't have some of the dependencies properly installed. I can also now use kerl so I don't have to build from source. Many thanks! –  Oct 05 '15 at 18:39
  • How can I do it with kerl? E.g. this part is not clear for me – Oleg Tarasenko Dec 15 '16 at 12:07
  • @OlegTarasenko can you try the steps here http://docs.basho.com/riak/ts/1.3.1/installing/source/erlang/ – byaruhaf Dec 15 '16 at 12:11
2

If someone struggling with this issue in "asdf" version manager in ubuntu then you need to install following packages

sudo apt-get -y install libwxgtk3.0-dev libgl1-mesa-dev libglu1-mesa-dev libpng3

Senthil
  • 1,499
  • 16
  • 17
1

Arch Linux users should replace erlang-nox (headless) with the full erlang version. pacman prompts you to do so if you run pacman -S erlang

fhdhsni
  • 1,529
  • 1
  • 13
  • 21