I have database.yml error when i open armitage(postgresql connection established) so i installed gems via bundle install. also did gem install rake
. i deleted database.yml file because armitage was not accepting it, then i tried to create it but i get the following error(yml file is actually created but have missing parts):
msfdb init
Metasploit running on Kali Linux as root, using system database
Resetting password of database user 'msf'
Creating databases 'msf' and 'msf_test'
┏━(Message from Kali developers)
┃
┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┃ We have kept /usr/bin/python pointing to Python 2 for backwards
┃ compatibility. Learn how to change this and avoid this message:
┃ ⇒ https://www.kali.org/docs/general-use/python3-transition/
┃
┗━(Run: “touch ~/.hushlogin” to hide this message)
Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema
bundler: failed to load command: rake (/opt/metasploit-framework/embedded/bin/rake)
Traceback (most recent call last):
22: from /opt/metasploit-framework/embedded/bin/bundle:23:in `<main>'
21: from /opt/metasploit-framework/embedded/bin/bundle:23:in `load'
20: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:37:in `<top (required)>'
19: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
18: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:49:in `block in <top (required)>'
17: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:25:in `start'
16: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
15: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:31:in `dispatch'
14: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
13: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
12: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
11: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:477:in `exec'
10: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:23:in `run'
9: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:56:in `kernel_load'
8: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:56:in `require_relative'
7: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/setup.rb:20:in `<top (required)>'
6: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/ui/shell.rb:88:in `silence'
5: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/ui/shell.rb:136:in `with_level'
4: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/setup.rb:20:in `block in <top (required)>'
3: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler.rb:149:in `setup'
2: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/runtime.rb:18:in `setup'
1: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/definition.rb:228:in `specs_for'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/definition.rb:490:in `materialize': Could not find jekyll-4.2.0, colorator-1.1.0, em-websocket-0.5.2, jekyll-sass-converter-2.1.0, jekyll-watch-2.2.1, kramdown-2.3.1, kramdown-parser-gfm-1.1.0, liquid-4.0.3, mercenary-0.4.0, pathutil-0.16.2, rouge-3.26.0, safe_yaml-1.0.5, terminal-table-2.0.0, http_parser.rb-0.6.0, concurrent-ruby-1.1.9, sassc-2.4.0, listen-3.7.0, forwardable-extended-2.6.0, unicode-display_width-1.7.0, rb-fsevent-0.11.0, rb-inotify-0.10.1 in any of the sources (Bundler::GemNotFound)
Also as you can see i get other errors but it's solved if I run the command in root directory if i remember correctly(trying to solve this for 6 hours and forgot in which case it was solving.)
But first problem is rake. So can anyone please help me about these? I couldn't find any rakefile and don't know what to do.