After command ‘git pull’, metasploit cann’t start with errors.
[nixawk@core metasploit-framework]$ ./msfconsole
Could not find metasploit_data_models-0.23.0 in any of the sources
Run `bundle install` to install missing gems.
[nixawk@core metasploit-framework]$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.6.11
Using multi_json 1.0.4
....
Gem::InstallError: metasploit_data_models requires Ruby version >= 2.1.
An error occurred while installing metasploit_data_models (0.23.0), and Bundler cannot continue.
Make sure that `gem install metasploit_data_models -v '0.23.0'` succeeds before bundling.
[nixawk@core metasploit-framework]$ gem install metasploit_data_models -v '0.23.0'
ERROR: Error installing metasploit_data_models:
metasploit_data_models requires Ruby version >= 2.1.
Solutions:
[nixawk@core metasploit-framework]$ ruby --version
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
[nixawk@core metasploit-framework]$ source ~/.rvm/scripts/rvm
[nixawk@core metasploit-framework]$ rvm list
Warning! PATH is not properly set up, '/home/notfound/.rvm/gems/ruby-1.9.3-p551/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p551'.
rvm rubies
=> ruby-1.9.3-p551 [ x86_64 ]
* ruby-2.1.5 [ x86_64 ]
# => - current
# =* - current && default
# * - default
[nixawk@core metasploit-framework]$ rvm use ruby-2.1.5
Warning! PATH is not properly set up, '/home/notfound/.rvm/gems/ruby-1.9.3-p551/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p551'.
Using /home/notfound/.rvm/gems/ruby-2.1.5
[nixawk@core metasploit-framework]$ msfconsole
[1].https://rvm.io/rvm/basics
[2].https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment
文章详细介绍了如何解决在使用Metasploit框架时遇到的Ruby版本不匹配导致的安装错误,包括从环境配置到具体操作步骤的全面指导。

6215

被折叠的 条评论
为什么被折叠?



