I’ve literally been trying to install metasploit for 2 days now and I think that's a ridiculous amount of time just to install some software. I have Arch linux and I am trying to install metasploit-git from AUR. I’ve followed the Arch linux metasploit guide, as well as this.
I’ve followed the guide all the way up to the point where I need to run
bundle install. It successfully installs a handful of gems, but fails with this error:
Gem::InstallError: metasploit-concern requires Ruby version >= 2.1. An error occurred while installing metasploit-concern (0.4.0), and Bundler cannot continue. Make sure that `gem install metasploit-concern -v '0.4.0'` succeeds before bundling.
Here are some of the environment variables:
MY_RUBY_HOME=/home/me/.rvm/rubies/ruby-1.9.3-p551 RUBY_VERSION=ruby-2.2.1 PATH=/home/me/.rvm/gems/ruby-1.9.3-p551/bin:/home/me/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/me/.rvm/rubies/ruby-1.9.3-p551/bin:/home/me/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/me/.gem/ruby/2.2.0/bin:/home/me/.rvm/bin:/home/me/.rvm/bin
I see that some of the variables say ruby-1.9, but I’m not sure what to do about it. The output of
ruby --version is:
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
I have ruby 2.2.1 installed so I don’t know why this is still showing as the the version.
It turns out that the problem was having multiple instances of
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Removing all but one in /etc/profile, and then running
rvm use --default 2.2.1 fixed this.