问题
Unable to find a spec satisfying metasploit-framework (>= 0) in the set. Perhaps the lockfile is corrupted?
Run bundle install
to install missing gems.
解决办法
gem换源
gem sources -l
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ #换国内源并删除旧有源
gem update --system # 更新gem
gem install bundler -v 2.2.4 # gem版本一定要和bundler版本对应,否则报错
安装依赖包
apt-get install ruby-dev
apt-get install postgresql
apt-get install libpcap-dev
apt-get install oracle*
apt-get install libsqlite3-dev
安装bundle
cd /usr/share/metasploit-framework/
bundle install