6

After istallation of Metaploit via darkoperator/MSF-Installer try to start the msfconsole and it return:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- /usr/local/bin/config/boot (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/bin/msfconsole:23:in `<main>'

using:

Linux ubuntu 3.13.0-32-generic 

Have someone an idea?

steenslag
  • 79,051
  • 16
  • 138
  • 171

5 Answers5

15

For me it helped following:

sudo chmod o+r /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb

after that user is able to run metasploit.

user4170357
  • 151
  • 1
  • 3
3

As user4170357 but with a slight difference due to: Mac OS X 10.9.5

to fix, run:

sudo chmod o+r /Library/Ruby/Gems/2.0.0/gems/robots-0.10.1/lib/robots.rb

(path is a little bit different than original answer)

Phil L.
  • 2,637
  • 1
  • 17
  • 11
2

This is a bug in the kernel where file-system becomes read-only or inaccessible randomly. Read more here.

To fix Just reboot and it will be fixed.

AK_
  • 1,879
  • 4
  • 21
  • 30
0

From http://techlogbook.wordpress.com/2014/08/19/installing-metasploit-on-xubuntu-14-04/

$ msfconsole /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- /usr/local/bin/config/boot (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /usr/local/bin/msfconsole:23:in `'

What I did was to edit /usr/local/bin/msfconsole line 23, and replace that line with: require File.expand_path('/usr/local/share/metasploit-framework/config/boot.rb', __FILE__)

Make sure that the path for config/boot.rb is correct for your system.

Now, when I run msfconsole again, it gives me some warning of missing permission to write some log file. Rails Error: Unable to access log file. Please ensure that /usr/local/share/metasploit-framework/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

So I need to create the directory and make sure it is accessible.

$ cd /usr/local/share/metasploit-framework/

$ mkdir log

$ chmod 777 log

Now, I can run msfconsole. Before reaching the prompt, however, I got the following warning:

[-] WARNING! The following modules could not be loaded!

[-] /usr/local/share/metasploit-framework/modules/auxiliary/scanner/smb/smb_login.rb: LoadError cannot load such file -- robots`

Maybe that can help you get started

Steven Spasbo
  • 647
  • 7
  • 18
-1

this might be becuase you bundled or installed metasploit as root you might need to get root access to run metasploit