Installing erlang on ubuntu is quite easy with apt.
sudo apt-get install erlang erlang-doc
Now you can enter into the interactive prompt using
erl command and compile with
Build from source
If you want erland 17.0 or latest, you may need to build erlang from the source, I highly recommend to use @bryanhunter‘s build-erlang-17.0.sh gist. It worked for me on Ubuntu 14.04. This gist will install all the dependencies needed for erlang 17.
You can download the file, give executable permission and run as sudo user.
wget https://gist.githubusercontent.com/bryanhunter/10380945/raw/build-erlang-17.0.sh chmod u+x build-erlang-17.0.sh sudo ./build-erlang-17.0.sh