升级metasploit之后出现报错的解决方法/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10:warning:constantGem::ConfigMapisdeprecated
工具/原料
KaliLinux2019.3
方法/步骤
1、首先更新apt程序库aptupdate
2、更新metasploit框架aptinstallmetasploit-framework
3、运酚祯馄嫱行msfconsole发现报错了,报错信息为/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10:wa鸡堕樱陨rning:constantGem::ConfigMapisdeprecatedCouldnotfindio-console-0.5.6inanyofthesourcesRun`bundleinstall`toinstallmissinggems提示需要执行bundleinstall
4、安装的bundler版本需要大于等于Gemfile.lock中要求的版本cd/usr/share/metasploit-framework/catGemfile.lock|grep-A1"BUNDLED"
5、进行gem更新gemupdate--system
6、安装对应版本的bundlergeminstallbundler-v2.1.4
7、经过测试需要安装这些依赖apt-getinstallruby-devapt-getinstallpostgresqlapt-getinstalllibpcap-devapt-getinstalloracle*apt-getinstalllibsqlite3-dev
8、进入metasploit目录,执行bundleinstall安装cd/usr/share/metasploit-framework/bundleinstall
9、执行msfconsole成功启动,但会出现下面警告提示。/usr/lib/rub鲻戟缒男y/vendor_ruby/rubygems/defaults/op髫潋啜缅erating_system.rb:10:warning:constantGem::ConfigMapisdeprecated
10、通过下面方式可以解决警告提示的问题。sed-i&q掼鸿乡羰uot;s#Gem::ConfigMap\[:arch\]#RbConfig::CON僻棍募暖FIG\['arch'\]#g;s#Gem::ConfigMap\[:ruby_version\]#RbConfig::CONFIG\['ruby_version'\]#g"/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb