rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
34.14k stars 13.97k forks source link

Error encountered while running ./msfconsole in local cloned repository #9401

Closed itsmeroy2012 closed 6 years ago

itsmeroy2012 commented 6 years ago

It occurs when running metasploit locally in the cloned repository.

./msfvenom gives the same error

Error encountered:

root@kali:/home/leolanders/metasploit-framework# ./msfconsole
/usr/lib/x86_64-linux-gnu/ruby/2.3.0/psych.so: warning: already initialized constant Psych::Parser::ANY
/usr/lib/x86_64-linux-gnu/ruby/2.3.0/psych.so: warning: already initialized constant Psych::Parser::UTF8
/usr/lib/x86_64-linux-gnu/ruby/2.3.0/psych.so: warning: already initialized constant Psych::Parser::UTF16LE
/usr/lib/x86_64-linux-gnu/ruby/2.3.0/psych.so: warning: already initialized constant Psych::Parser::UTF16BE
/usr/lib/ruby/2.3.0/psych/class_loader.rb:7: warning: already initialized constant Psych::ClassLoader::BIG_DECIMAL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:7: warning: previous definition of BIG_DECIMAL was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:8: warning: already initialized constant Psych::ClassLoader::COMPLEX
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:8: warning: previous definition of COMPLEX was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:9: warning: already initialized constant Psych::ClassLoader::DATE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:9: warning: previous definition of DATE was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:10: warning: already initialized constant Psych::ClassLoader::DATE_TIME
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:10: warning: previous definition of DATE_TIME was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:11: warning: already initialized constant Psych::ClassLoader::EXCEPTION
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:11: warning: previous definition of EXCEPTION was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:12: warning: already initialized constant Psych::ClassLoader::OBJECT
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:12: warning: previous definition of OBJECT was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:13: warning: already initialized constant Psych::ClassLoader::PSYCH_OMAP
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:13: warning: previous definition of PSYCH_OMAP was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:14: warning: already initialized constant Psych::ClassLoader::PSYCH_SET
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:14: warning: previous definition of PSYCH_SET was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:15: warning: already initialized constant Psych::ClassLoader::RANGE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:15: warning: previous definition of RANGE was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:16: warning: already initialized constant Psych::ClassLoader::RATIONAL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:16: warning: previous definition of RATIONAL was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:17: warning: already initialized constant Psych::ClassLoader::REGEXP
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:17: warning: previous definition of REGEXP was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:18: warning: already initialized constant Psych::ClassLoader::STRUCT
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:18: warning: previous definition of STRUCT was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:19: warning: already initialized constant Psych::ClassLoader::SYMBOL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:19: warning: previous definition of SYMBOL was here
/usr/lib/ruby/2.3.0/psych/class_loader.rb:65: warning: already initialized constant Psych::ClassLoader::CACHE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/class_loader.rb:65: warning: previous definition of CACHE was here
/usr/lib/ruby/2.3.0/psych/scalar_scanner.rb:9: warning: already initialized constant Psych::ScalarScanner::TIME
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/scalar_scanner.rb:9: warning: previous definition of TIME was here
/usr/lib/ruby/2.3.0/psych/scalar_scanner.rb:12: warning: already initialized constant Psych::ScalarScanner::FLOAT
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/scalar_scanner.rb:12: warning: previous definition of FLOAT was here
/usr/lib/ruby/2.3.0/psych/scalar_scanner.rb:18: warning: already initialized constant Psych::ScalarScanner::INTEGER
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/scalar_scanner.rb:18: warning: previous definition of INTEGER was here
/usr/lib/ruby/2.3.0/psych/nodes/stream.rb:13: warning: already initialized constant Psych::Nodes::Stream::ANY
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/stream.rb:13: warning: previous definition of ANY was here
/usr/lib/ruby/2.3.0/psych/nodes/stream.rb:16: warning: already initialized constant Psych::Nodes::Stream::UTF8
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/stream.rb:16: warning: previous definition of UTF8 was here
/usr/lib/ruby/2.3.0/psych/nodes/stream.rb:19: warning: already initialized constant Psych::Nodes::Stream::UTF16LE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/stream.rb:19: warning: previous definition of UTF16LE was here
/usr/lib/ruby/2.3.0/psych/nodes/stream.rb:22: warning: already initialized constant Psych::Nodes::Stream::UTF16BE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/stream.rb:22: warning: previous definition of UTF16BE was here
/usr/lib/ruby/2.3.0/psych/nodes/sequence.rb:43: warning: already initialized constant Psych::Nodes::Sequence::ANY
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/sequence.rb:43: warning: previous definition of ANY was here
/usr/lib/ruby/2.3.0/psych/nodes/sequence.rb:46: warning: already initialized constant Psych::Nodes::Sequence::BLOCK
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/sequence.rb:46: warning: previous definition of BLOCK was here
/usr/lib/ruby/2.3.0/psych/nodes/sequence.rb:49: warning: already initialized constant Psych::Nodes::Sequence::FLOW
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/sequence.rb:49: warning: previous definition of FLOW was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:10: warning: already initialized constant Psych::Nodes::Scalar::ANY
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:10: warning: previous definition of ANY was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:13: warning: already initialized constant Psych::Nodes::Scalar::PLAIN
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:13: warning: previous definition of PLAIN was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:16: warning: already initialized constant Psych::Nodes::Scalar::SINGLE_QUOTED
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:16: warning: previous definition of SINGLE_QUOTED was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:19: warning: already initialized constant Psych::Nodes::Scalar::DOUBLE_QUOTED
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:19: warning: previous definition of DOUBLE_QUOTED was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:22: warning: already initialized constant Psych::Nodes::Scalar::LITERAL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:22: warning: previous definition of LITERAL was here
/usr/lib/ruby/2.3.0/psych/nodes/scalar.rb:25: warning: already initialized constant Psych::Nodes::Scalar::FOLDED
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/scalar.rb:25: warning: previous definition of FOLDED was here
/usr/lib/ruby/2.3.0/psych/nodes/mapping.rb:17: warning: already initialized constant Psych::Nodes::Mapping::ANY
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/mapping.rb:17: warning: previous definition of ANY was here
/usr/lib/ruby/2.3.0/psych/nodes/mapping.rb:20: warning: already initialized constant Psych::Nodes::Mapping::BLOCK
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/mapping.rb:20: warning: previous definition of BLOCK was here
/usr/lib/ruby/2.3.0/psych/nodes/mapping.rb:23: warning: already initialized constant Psych::Nodes::Mapping::FLOW
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/nodes/mapping.rb:23: warning: previous definition of FLOW was here
/usr/lib/ruby/2.3.0/psych/visitors/visitor.rb:11: warning: already initialized constant Psych::Visitors::Visitor::DISPATCH
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/visitors/visitor.rb:11: warning: previous definition of DISPATCH was here
/usr/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:334: warning: already initialized constant Psych::Visitors::ToRuby::SHOVEL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/visitors/to_ruby.rb:334: warning: previous definition of SHOVEL was here
/usr/lib/ruby/2.3.0/psych/handler.rb:27: warning: already initialized constant Psych::Handler::OPTIONS
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/handler.rb:27: warning: previous definition of OPTIONS was here
/usr/lib/ruby/2.3.0/psych/handler.rb:30: warning: already initialized constant Psych::Handler::EVENTS
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/handler.rb:30: warning: previous definition of EVENTS was here
/usr/lib/ruby/2.3.0/psych/visitors/yaml_tree.rb:440: warning: already initialized constant Psych::Visitors::YAMLTree::NULL
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/visitors/yaml_tree.rb:440: warning: previous definition of NULL was here
/usr/lib/ruby/2.3.0/psych/visitors/yaml_tree.rb:441: warning: already initialized constant Psych::Visitors::YAMLTree::BINARY_RANGE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/visitors/yaml_tree.rb:441: warning: previous definition of BINARY_RANGE was here
/usr/lib/ruby/2.3.0/psych/visitors/yaml_tree.rb:442: warning: already initialized constant Psych::Visitors::YAMLTree::WS_RANGE
/var/lib/gems/2.3.0/gems/psych-2.2.4/lib/psych/visitors/yaml_tree.rb:442: warning: previous definition of WS_RANGE was here
/usr/lib/ruby/2.3.0/psych/parser.rb:34:in `<class:Parser>': superclass mismatch for class Mark (TypeError)
    from /usr/lib/ruby/2.3.0/psych/parser.rb:33:in `<module:Psych>'
    from /usr/lib/ruby/2.3.0/psych/parser.rb:2:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require_with_backports'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
    from /usr/lib/ruby/2.3.0/psych.rb:14:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require_with_backports'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
    from /var/lib/gems/2.3.0/gems/faker-1.8.7/lib/faker.rb:5:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require_with_backports'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
    from /home/leolanders/metasploit-framework/lib/msf/core/cert_provider.rb:2:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require_with_backports'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /var/lib/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
    from /home/leolanders/metasploit-framework/lib/msf/core/framework.rb:64:in `<class:Framework>'
    from /home/leolanders/metasploit-framework/lib/msf/core/framework.rb:26:in `<module:Msf>'
    from /home/leolanders/metasploit-framework/lib/msf/core/framework.rb:18:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require'
    from /var/lib/gems/2.3.0/gems/backports-3.11.0/lib/backports/std_lib.rb:9:in `require_with_backports'
    from /home/leolanders/metasploit-framework/lib/msf/core.rb:46:in `<top (required)>'
    from /home/leolanders/metasploit-framework/lib/msf/core/payload/apk.rb:3:in `require'
    from /home/leolanders/metasploit-framework/lib/msf/core/payload/apk.rb:3:in `<top (required)>'
    from /home/leolanders/metasploit-framework/lib/msf/core/payload_generator.rb:2:in `require'
    from /home/leolanders/metasploit-framework/lib/msf/core/payload_generator.rb:2:in `<top (required)>'
    from ./msfconsole:47:in `require'
    from ./msfconsole:47:in `<main>'
root@kali:/home/leolanders/metasploit-framework# 

System information:

root@kali:/home/leolanders/metasploit-framework# uname -a
Linux kali 4.14.0-kali1-amd64 #1 SMP Debian 4.14.2-1kali1 (2017-12-04) x86_64 GNU/Linux

Metasploit version:

Framework: 4.16.31-dev-7876e12ae3
Console  : 4.16.31-dev-7876e12ae3
wvu commented 6 years ago

So you cloned it, but how did you set it up?

itsmeroy2012 commented 6 years ago

Following the instructions given in https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment .

I have also cloned it again freshly and then followed the instructions given in the wiki. ./msfconsole and ./msfvenom ran for the first time but the same error popped up when I tried to run them from a new terminal or even when I restarted my system and tried running them again.

bcoles commented 6 years ago

Does running source ~/.bashrc help?

Are you using a Ruby environment manager such as rbenv or rvm ?

itsmeroy2012 commented 6 years ago

@bcoles . Yes I'm using rvm. But I've done it before too it used to work flawlessly. Recently I updated my metasploit repo and it's causing issues after that most probably.

wvu commented 6 years ago

Those look like system gems, which shouldn't be the case if you're using RVM.

hiw0rld commented 6 years ago

@itsmeroy2012 I met the same question....

busterb commented 6 years ago

Metasploit doesn't even use 'psych' as far as I can tell, and if you were using rvm, it would be using Ruby 2.4 and not 2.3. I don't think this is a problem with metasploit.

hiw0rld commented 6 years ago

Finally I solved it... First update ruby to 2.4.0 not 2.5.0. Then add gem 'psych' to Gemfile under msfconsole root dir.

itsmeroy2012 commented 6 years ago

Will check that out @hiw0rld . Thanks

MichelBitar99 commented 5 years ago

Finally I solved it... First update ruby to 2.4.0 not 2.5.0. Then add gem 'psych' to Gemfile under msfconsole root dir.

Umm I'd be eternally gratefull if you could provide the steps, I dont have rvm

bcoles commented 5 years ago

@MichelBitar99 what OS are you using? If it's a Linux based distribution, you should be able to install Ruby version 2.5 from your operating system package repository or ports.

MichelBitar99 commented 5 years ago

Hey mate, I am using Kali Linux. Metasploit used to work perfectly, until once I followed some instructions to setup some database for burpsuite I think. Now I'm getting the same error as OP. I have ruby 2.5 installed, however OP mentioned that the error disappeared when we downgraded to 2.4, however I cant install rvm for some reasons to downgrade. Any idea how to install specific version of ruby using apt-get install ?

bcoles commented 5 years ago

@MichelBitar99 downgrading to Ruby 2.4 is not ideal. While Ruby 2.4 is supported by both the Ruby team and Metasploit, the Ruby environment on Kali is 2.5.3.

Are you receiving the exact same error as the OP (who is using Ruby 2.3) ?

As far as I'm aware, Metasploit does not use Psych. It's not listed in the gemspec, Gemfile or Gemfile.lock. This is an issue with your Ruby environment.

MichelBitar99 commented 5 years ago

@bcoles The thing is that I'm not really familiar with what ruby is, I'm just learning how to use some tools etc... I reinstalled ruby (back to 2.4) and I got rake gem missing. I guess all I need now is to find out how to add the gems (which I got no clue what they are but I guess ill figure out) Unless you got an easy fix I'd be thankful. And yea I had the same error when I had ruby 2.5

AyushRajput670 commented 2 years ago

I am having a error while opening msfconsole Someone please help me out

Error is like this :

/data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/boot.rb:4: warning: already initialized constant GEMFILE_EXTENSIONS /data/data/com.termux/files/home/metasploit-framework/config/boot.rb:4: warning: previous definition of GEMFILE_EXTENSIONS was here /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in require': cannot load such file -- nokogiri/nokogiri (LoadError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in load_dependency' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:30:in rescue in <top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:4:in<top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in require_relative' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in<top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in load_dependency' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inrequire' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/metasploit/framework.rb:13:in <top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:73:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:73:in rescue in block in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:51:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in each' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler.rb:176:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/application.rb:10:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in<top (required)>' from /data/data/com.termux/files/usr/bin/msfconsole:18:in require' from /data/data/com.termux/files/usr/bin/msfconsole:18:in

' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in require_relative': dlopen failed: library "libm.so.6" not found - /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.1/nokogiri.so (LoadError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in<top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in require_relative' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in<top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in load_dependency' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:inrequire' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/metasploit/framework.rb:13:in <top (required)>' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:73:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:73:in rescue in block in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:51:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in each' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler.rb:176:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/application.rb:10:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in<top (required)>' from /data/data/com.termux/files/usr/bin/msfconsole:18:in require' from /data/data/com.termux/files/usr/bin/msfconsole:18:in
' /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:in require': cannot load such file -- metasploit-framework (LoadError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:inblock (2 levels) in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in each' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:inblock in require' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in each' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:inrequire' from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/bundler-2.3.8/lib/bundler.rb:176:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/application.rb:10:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/config/environment.rb:2:in<top (required)>' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in require' from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.4/lib/msfenv.rb:18:in<top (required)>' from /data/data/com.termux/files/usr/bin/msfconsole:18:in require' from /data/data/com.termux/files/usr/bin/msfconsole:18:in
' /data/data/com.termux/files/usr/bin/msfconsole: warning: Exception in finalizer #<Proc:0x0000007a03b2ca00 /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:85> /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in new': can't alloc thread (ThreadError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:inblock in threadlocal_finalizer' /data/data/com.termux/files/usr/bin/msfconsole: warning: Exception in finalizer #<Proc:0x0000007a03b2cdc0 /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:85> /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in new': can't alloc thread (ThreadError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:inblock in threadlocal_finalizer'

Please help me out