Jump to content

Metasploit msfdb error | Kali Linux 2018.1


Recommended Posts

Hey guys,

my problem is that I have just installed the Kali Linux VMware Image. I changed my pass and then I did an update (apt-get update && apt-get dist-upgrade).

Now I get an error when I try to initialize the Metasploit databse with „msfdb init"  :

root@kali:~# msfdb reinit
Database already started
[+] Dropping databases 'msf'
[+] Dropping databases 'msf_test'
[+] Dropping database user 'msf'
[+] Deleting configuration file /usr/share/metasploit-framework/config/database.yml
[+] Stopping database
[+] Starting database
[+] Creating database user 'msf'
Geben Sie das Passwort der neuen Rolle ein:
Geben Sie es noch einmal ein:
[+] Creating databases 'msf'
[+] Creating databases 'msf_test'
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schema
rake aborted!
NoMethodError: undefined method `without' for #<Bundler::Settings:0x0000564cdb9a7b70>
Did you mean?  with_options
/usr/share/metasploit-framework/Rakefile:18:in `rescue in <top (required)>'
/usr/share/metasploit-framework/Rakefile:12:in `<top (required)>'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- rspec/core
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/backports-3.11.1/lib/backports/std_lib.rb:9:in `require'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/backports-3.11.1/lib/backports/std_lib.rb:9:in `require_with_backports'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/usr/share/metasploit-framework/Rakefile:13:in `<top (required)>'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

Also when I start msfconsole there appears an error :

root@kali:~# msfconsole
/usr/share/metasploit-framework/lib/msf/core/opt.rb:55: warning: constant OpenSSL::SSL::SSLContext::METHODS is deprecated

When I type db_status in msfconsole it says it is connected, but when i search for something it says that the cache is not build yet.


Anyone got a solution for this ? :/

Thanks in advance

Link to comment
Share on other sites

I'm not a ruby master, but it looks like some syntax got messed up. Hopefully, the maintainer will get this fixed. Until then, I was able to work around this by commenting out the LoadError section of:


rescue LoadError
  #puts "rspec not in bundle, so can't set up spec tasks.  " \
  #     "To run specs ensure to install the development and test groups."
  #puts "Bundle currently installed '--without #{Bundler.settings.without.join(' ')}'."
  #puts "To clear the without option do `bundle install --without ''` (the --without flag with an empty string) or " \
  #     "`rm -rf .bundle` to remove the .bundle/config manually and then `bundle install`"
  puts "LoadError section commented out."


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...