Go here and download the bin file appropriate to your OS version.
Assuming your downloaded file ended up on your Dowloads directory:
$ cd ~/Downloads $ chmod a+x android-ndk-r10d-linux-x86_64.bin $ ./android-ndk-r10c-darwin-x86_64.bin
$ mv android-ndk-r10d ~/Android/ndk
Either
$ export PATH=$PATH:~/Android/ndk
Or add that same line in your ~/.profile file or other similar file