bitli
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 runerl. - (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
unzip Precompiled.zip. - 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
wget https://raw.githubusercontent.com/termux/termux-packages/master/packages/termux-tools/termux-fix-shebang. - Execute
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). - Execute
which envand edit the first line of mix to set the path of commandenvto the one found by the command which. - Add
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.
Trending in Guides/Tuts
You probably already know that <span>{nil}</span> in a HEEX template produces <span> </span> when rendered. I fin...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #elixirconf-us
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
PatNowak
Termux is awesome, but you might inform at the top of the post that this is the guide only for Android 5.0 and above. Thanks for the guide!
gregoryforel
Thanks for that!
When I
apt install wget, Im asked to validate with [Y/n].If I press y or Y:
No command y found, did you mean Command [ from package coreutils, Command k from package kona etc.
And pressing Enter directly does nothing
Any idea please?
NobbZ
Please try
apt install --yes wget, for the older interface to apt, that meant to not ask but assume the operator knows what he is doing and install/remove everything. Can’t check though if it is still valid on the new interface which is used by termux.gregoryforel
Thank you for your quick answer, it worked!
zlfera
thank your guides. i can use elixir on my android phone and can install phoenix. but when i execute “mix ecto.create”. it has a problem,it said i do not install rebar3.but i have install rebar3 with mix. do you have this problem?
NobbZ
Can you copy and paste or screenshot the exact error message you get? Can you also show the output of
ls -lah ~/.mix?zlfera
~ ls -lah ~/.mix
total 984K
drwx------ 3 u0_a125 u0_a125 4.0K Aug 28 19:30 .
drwx------ 17 u0_a125 u0_a125 4.0K Aug 28 20:11 ..
drwx------ 4 u0_a125 u0_a125 4.0K Aug 28 14:33 archives
-rwxr-xr-x 1 u0_a125 u0_a125 200K Aug 28 19:30 rebar
-rwxr-xr-x 1 u0_a125 u0_a125 767K Aug 28 19:30 rebar3
NobbZ
That looks correct. And the error message?
zlfera
this is the error
sh: 1: /data/data/com.termux/files/home/.mix/rebar3: not found
** (Mix) Could not compile dependency :ranch, “/data/data/com.termux/files/home/.mix/rebar3 bare compile --paths “/data/data/com.termux/files/home/hello/_build/dev/lib/*/ebin”” command failed. You can recompile this dependency with “mix deps.compile ranch”, update it with “mix deps.update ranch” or clean it with “mix deps.clean ranch”
NobbZ
Can you run rebar manually?
~/.mix/rebar3 helpAlso please make sure, that
realpath ~prints/data/data/com.termux/files/homeand thatecho $HOMEdoes as well.