Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have already semi-successfully installed the Metasploit Framework, but when I attempt to run the Metasploit console (msfconsole) it returns with the error:

/usr/local/bin/msfconsole:23:in `require': no such file to load -- /usr/local
/bin/config/boot (LoadError) from /usr/local/bin/msfconsole:23

I have been trying to fix this and searching on the web for days with no success. It's starting to get really frustrating.

share|improve this question
1  
Possibly something to do with ruby: stackoverflow.com/questions/2896485/… –  muru Aug 16 at 14:57
2  
@Paul Please, don't write your solution on the question, take a time and write it as an answer instead. People doesn't look for solutions on a question but on the answer section. –  Lucio Aug 17 at 21:22
    
I was also having the same problem Running as following worked for me ./msfconsole –  shubhu Aug 18 at 21:01

3 Answers 3

They broke it for modern versions of ruby in commit 149c3ecc63bfe8bb261b47ccc783cd9f728692e5. My understanding is it has to do with changes to how ruby handles its path and loading requires.

A quick and dirty hack until they fix it upstream:

diff --git a/msfconsole b/msfconsole
index 9dee479..c3769bb 100755
--- a/msfconsole
+++ b/msfconsole
@@ -20,7 +20,8 @@ require 'pathname'
 #

 # @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
-require Pathname.new(__FILE__).expand_path.parent.join('config', 'boot')
+#require Pathname.new(__FILE__).expand_path.parent.join('config', 'boot')
+require_relative 'config/boot'
 require 'metasploit/framework/command/console'

 Metasploit::Framework::Command::Console.start
share|improve this answer

Answered by OP in question.

It wasn't something to do with ruby. I opened up the msfconsole file and there was an invalid 'require' path.

share|improve this answer
up vote 0 down vote accepted

I reinstalled Ubuntu 12.04 and Metasploit and made sure there was only 1 ruby version (ruby-core). I started it up and it worked perfectly fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.