编程语言
首页 > 编程语言> > metasploit更新后msfconsole报错You must use Bundler 2 or greater with this lockfile.

metasploit更新后msfconsole报错You must use Bundler 2 or greater with this lockfile.

作者:互联网

在Kali上进行metasploit的更新:

apt-get update
apt-get install -y metasploit-framework

执行msfconsole,报错:

You must use Bundler 2 or greater with this lockfile.

看到这里后,去搜索,按网上的方法

gem update --system
gem install bundler -v 2.0.1

成功安装2.0.1版本的bundler后,可是执行msfconsole还是同样报错,这里得找Gemfile.lock的路径

cd /usr/share/metasploit-framework/
bundler update
# 报错如下
Traceback (most recent call last):
    2: from /usr/local/bin/bundler:23:in `<main>'
    1: from /usr/local/lib/site_ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/lib/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)

最后pcat经过一番摸索,发现最主要的是:安装的bundler版本需要大于等于Gemfile.lock中要求的版本

cd /usr/share/metasploit-framework/
cat Gemfile.lock | grep -A 1 "BUNDLED"

得到bundler的版本

BUNDLED WITH
   2.1.4

重新安装这个版本

gem update --system
gem install bundler -v 2.1.4

之后msfconsole就可以正常运行。

 

标签:metasploit,use,msfconsole,bundler,报错,usr,gem
来源: https://www.cnblogs.com/pcat/p/12500873.html