Instructions to run Elixir on Android

Never tried. I SSH into real hardware or use my laptop, makes things much easier…


I didn’t tell you to run escript ~/.mix/rebar3 literally, I told you to run it with the arguments that mix reports when failing. In your posted error, mix tried to call /data/data/com.termux/files/home/.mix/rebar3 bare compile --paths "/data/data/com.termux/files/home/hello/_build/dev/lib/*/ebin", so you have to call escript ~/.mix/rebar3 bare compile --paths "/data/data/com.termux/files/home/hello/_build/dev/lib/*/ebin" and I’d guess you need to be in dependencies root-folder, but maybe you need to be somewhere else.

1 Like

Thank you for your patient reply.

hi guys…i installed elixir on termux just now…can i run phoenix on it as well?

@jay1, seeing both of your posts, you should probably start with learning how to use a terminal and bash. The knowledge will help you to understand many things in the elixir ecosystem.

Now to your questions:

It should be a subfolder of where you are after you have unzipped the release. At least, that were the most obvious thing after reading the walkthrough.

Perhaps you have already created the folder. Just try to cd into it. Or if you are sure you do not need it anymore, delete it and start again. Perhaps it is a file that you have created for a reason you don’t remember? If you do not need it anymore, delete it.

Also you can always use a different folder name in mkdir, you need to change subsequent commands then to respect this folder name then.

Hi sir, am on this part of installation, and i don’t know what and where to edit the first line of mix to set the path to command env…

I tried hard to unsderstand this but i don’t really understand this part. I’ve already executed that which env and here’s what i get

Can you help me direct what should i do next?
Thanks in advance…

here’s what i did (assuming you’re using termux):

  1. pkg install erlang
  • easiest way to install elixir is to use asdf-vm.
  1. git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.1

  2. Next do the following (im using zsh):

echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
  1. restart termux session
  2. asdf plugin-add elixir
  3. asdf install elixir 1.8.1 or to find a version you can: asdf list-all elixir
  4. asdf global elixir 1.8.1 to set this version globally

you can visit their page on how to install asdf-vm.

happy coding!

5 Likes