#!/bin/bash # This script will install dependencies then build and install erlang using kerl # Pull this file down, make it executable and run it with sudo # # wget https://gist.github.com/bryanhunter/adbd9c8d9fb2f6366eee/raw/build-erlang.sh # chmod u+x build-erlang.sh # sudo ./build-erlang.sh # # Version: 17.1 if [ $(id -u) != "0" ]; then echo "You must be the superuser to run this script" >&2 exit 1 fi apt-get update # Install curl (needed by kerl) apt-get -y install curl # 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 (observer needs this) 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 rebar3 wget https://s3.amazonaws.com/rebar3/rebar3 chmod +x rebar3 mv rebar3 /usr/local/bin # Update kerlrc cat > ~/.kerlrc <> ~/.bashrc