Installing Ronin on Termux

Copy/Paste Instructions

pkg install -y binutils clang make ruby libxml2 libxslt git zip nmap masscan graphviz
gem install nokogiri --platform ruby -- --use-system-libraries
gem install ronin

Detailed Breakdown

Build Dependencies

First we will need to install a C compiler (gcc or clang) and make. These are required to install certain ruby gems, which contain C extensions (aka C bindings) to other C libraries, such as the nokogiri, sqlite3, and nio4r gems.

pkg install -y binutils clang make

Ruby

Next, we will need to install Ruby >= 3.0.0, which should already be available in your system’s package manager.

pkg install -y ruby

Runtime Dependencies

Next we will need to install additional utilities, such as git and zip, that parts of Ronin use:

pkg install -y git zip

Nokogiri

In order to install the nokogiri gem, which parses HTML and XML, we will need to install the libxml2 and libxslt packages:

pkg install -y libxml2 libxslt

The nokogiri gem will attempt to build it’s own copy of libxml2, however the tar archive contains hardlinks, which are not allowed on the Android file system. So we must explicitly install nokogiri, but tell it to build against the system’s libxml2 and libxslt packages we installed above:

gem install nokogiri --platform ruby -- --use-system-libraries

Ronin

Now that everything else is installed, it is time to install Ronin!

sudo gem install ronin

Postinstall

Assuming no errors occur, you should now be able to run ronin:

ronin help

Troubleshooting

Ruby and many ruby gems will not work if the LANG environment variable is not set or set to C. Make sure that LANG is set to a UTF8 language, such as en_US.UTF-8.