[erlang-questions] How to get wxerlang working in in Ubuntu 14.04.4 LTS

Stefan Houtzager stefan.houtzager@REDACTED
Mon Apr 11 09:22:11 CEST 2016


I would appreciate an installscript for a recent erlang version on Ubuntu
14.04.4 LTS with wxerlang working.
  I am a starting elixir developer (and for that need erlang). I would like
to get wxerlang working and created a dockerimage to make my installation
easy portable. I use otp_src_18.3.tar.gz and install several wx packages
and others, I'm not sure if I miss some or install some that are not
needed. Anyway, after the install the output of which wx-config &&
wx-config --version-full is


But wx:demo(). results in an error:

Eshell V7.3  (abort with ^G)
1> wx:demo().
Error: Unable to initialize gtk, is DISPLAY set properly?

The most important installs in the dockerfile (just linux commands after
the RUN statements, phusion/baseimage:0.9.18 is Ubuntu 14.04.4 LTS reworked
for docker)  I copied below, the full dockerfile and the logging of the
output I arttached.

FROM phusion/baseimage:0.9.18
MAINTAINER Stefan Houtzager <stefan.houtzager@REDACTED>

# Important!  Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.

# Set correct environment variables.

# Setting ENV HOME does not seem to work currently. HOME is unset in Docker
# See bug : https://github.com/phusion/baseimage-docker/issues/119
#ENV HOME /root
# Workaround:
RUN echo /root > /etc/container_environment/HOME

# Regenerate SSH host keys. baseimage-docker does not contain any, so you
# have to do that yourself. You may also comment out this instruction; the
# init system will auto-generate one during boot.
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# ...put your own build instructions here...

# Set the locale
RUN locale-gen en_US.UTF-8


# See : https://github.com/phusion/baseimage-docker/issues/58
RUN echo 'debconf debconf/frontend select Noninteractive' |

# update and install some software requirements
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl wget
git unzip autoconf make g++ gcc fop libxml2-utils xsltproc


RUN add-apt-repository ppa:openjdk-r/ppa
RUN apt-get update && apt-get install openjdk-8-jdk -y


# install nano (and pico)
RUN apt-get update && apt-get install nano -y

# Needed for terminal handling (libc-dev libncurses5 libtinfo-dev libtinfo5
RUN apt-get -y install libncurses5-dev openssl libssl-dev m4 libncurses-dev
libgmp3-dev libglu-dev

# For building with wxWidgets
RUN apt-get -y install freeglut3-dev wx2.8-headers wx-common libwxbase2.8
libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev libgl1-mesa-dev
libglu1-mesa-dev libpng3

# For building ssl (libssh-4 libssl-dev zlib1g-dev)
RUN apt-get -y install libssh-dev

# ODBC support (libltdl3-dev odbcinst1debian2 unixodbc)
RUN apt-get -y install unixodbc-dev
RUN apt-get -y install ncurses-dev
RUN wget http://www.erlang.org/download/otp_src_18.3.tar.gz
RUN tar -xvzf otp_src_18.3.tar.gz
RUN chmod -R 777 otp_src_18.3
WORKDIR otp_src_18.3
RUN ./configure
RUN make
RUN make install
RUN cd .. && rm -R otp_src_18.3/

RUN echo "ERLANG_HOME=/usr/local/lib/erlang" >> ~/.bashrc
RUN echo "export PATH=$PATH:$ERLANG_HOME/bin" >> ~/.bashrc
RUN echo "export DISPLAY=:100.0" >> ~/.bashrc

RUN apt-get purge --auto-remove openjdk-8-jdk -y
RUN rm -R /usr/lib/jvm

Kind regards,

Stefan Houtzager

Houtzager ICT consultancy & development

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160411/c1a383ab/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dockerfile
Type: application/octet-stream
Size: 5614 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160411/c1a383ab/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: text/x-log
Size: 1965844 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160411/c1a383ab/attachment.bin>

More information about the erlang-questions mailing list