所以我在虚拟机中运行回溯5。我正在尝试更新metasploit。我从github下载了metasploit目录,并按照web的要求删除了旧的svn目录(https://community.rapid7.com/community/metasploit/blog/2013/05/20/git-clone-metasploit-dont-svn-checkout)。运行msfupdate:时出现此错误
root@bt:~/metasploit# ./msfupdate
[*]
[*] Attempting to update the Metasploit Framework...
[*]
[*] Checking for updates via git
[*] Note: Updating from bleeding edge
HEAD is now at a02e0ee Land #2682 - Kimai v0.9.2 'db_restore.php' SQL Injection
Already on 'master'
Already up-to-date.
[*] Updating gems...
./msfupdate:188:in `require': no such file to load -- bundler (LoadError)
from ./msfupdate:188:in `update_git!'
from ./msfupdate:137:in `block in run!'
from ./msfupdate:135:in `chdir'
from ./msfupdate:135:in `run!'
from ./msfupdate:292:in `<main>'
我知道我可以运行bundle命令来"bundle update"one_answers"bundle install"。顺便说一句,当你运行"捆绑包更新"时,这也会导致一个错误:
Gem::InstallError: factory_girl requires Ruby version >= 1.9.2.
考虑到我在询问Ruby的版本:时得到了这个,这很奇怪
root@bt:~/metasploit# ruby -v
ruby 1.9.2dev (2010-07-02) [x86_64-linux]
这不是最新版本,但我在更新Ruby时遇到了问题,在这一点上,我想我还不如求助于互联网,找一个真正知道这里发生了什么的人来帮忙。
一切都是正确的,因为1.9.2dev
版本早于1.9.2
:
irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.2')
# => false
irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.1')
# => true
作为临时解决方法,您可以尝试显式安装bundler
:
gem install bundler
显然,我建议你在任何情况下升级Ruby,dev
版本绝对不是最好的选择。