How to compile micro text editor on Termux on Android

Micro is a brilliant editor that is like an enhanced version of Nano. I’m really starting to enjoy coding in it. If you want to use it on Termux on Android, like I do then here’s a quick walk through on how to comile it.

In Termux we are going to need a couple of packages before we get started; git and golang:

apt insall git golang
Then we need to set the Path in your shell of choice, so open Termux and open the rc file to your shell of choice. I’m using zsh and nano in this case, so this is the command I use:
nano ~/.zshrc

So now we need to set the GoLang path so when we compile the program this is where the binary file will go. Add this line to your .zshrc/.bashrc file:
export GOPATH=$HOME/go
Save and exit, you may need to exit or just source your shell with:
source ~/.zshrc
Now it’s time go get the git repo and download it:

cd into the git cloned directory
cd micro

Now we need to compile the install by invoking the make command:
make
It may take a little time and appear to to nothing but it is. Once the command exits, enter the final command of

make install

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s