In case this is handy for other people, here is how you can run Elixir on Android:
- Install https://termux.com/
apt update; apt upgradeto have your system up to date.
- Install Erlang with
apt install erlang, you should be able to run
- (check if an Elixir package was created so you can avoid the trouble of the remaining lines )
- Install wget with
apt install wget(otherwise you will get bad address on any wget request).
- Create a directory, and cd to it, for example:
mkdir elixir; cd elixir.
- Download the precompiled package from the link named Precompiled.zip file for the latest release in the page http://elixir-lang.org/install.html#precompiled-package.At time of this writing the command
wget https://github.com/elixir-lang/elixir/releases/download/v1.4.2/Precompiled.zipshould do this.
- Unzip the files with
- Go to directory bin.
- Download the file termux-fix-shebang from the source at https://raw.githubusercontent.com/termux/termux-packages/master/packages/termux-tools/termux-fix-shebang. You can use
sh termux-fix-shebang elixir iex elixircin the bin directory (sh is required as the path of the shebang of the script is not compatible with termux).
which envand edit the first line of mix to set the path of command
envto the one found by the command which.
export PATH=$PATH:$HOME/elixir/binto your .bashrc or execute the command on your terminal.
You can then mix and iex. An Android phone is not exactly a convenient development platform, but it was useful to me to learn Elixir when waiting for whatever.