简体   繁体   中英

could not find a valid gem 'ruby'

I'm trying to install Metasploit on Raspberry Pi model B+

as I am new to the Metasploit and the Gems environment I was following the details in this link Installing Metasploit on Raspberry , everything was working fine until I reached bundling

root@ raspberrypi: ~/msf3# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
sh: 1: cannot create /2015110401 / null: Directory nonexistent
fatal: Not a git repository(or any of the parent directories): .git
Fetching gem metadata from https: //rubygems.org/.........
  Fetching version metadata from https: //rubygems.org/..
  Resolving dependencies............................................................................
Using rake 10.4.2
Using i18n 0.7.0
Using minitest 4.7.5
Using multi_json 1.11.2
Using thread_safe 0.3.5
Using tzinfo 0.3.44
Using activesupport 4.0.13
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.5
Using rack - test 0.6.3
Using actionpack 4.0.13
Using mime - types 2.6.1
Using mail 2.6.3
Using actionmailer 4.0.13
Using activemodel 4.0.13
Using activerecord - deprecated_finders 1.0.4
Using arel 4.0.2
Using activerecord 4.0.13
Using arel - helpers 2.1.0
Using ffi 1.9.8
Using childprocess 0.5.5
Using diff - lcs 1.2.5
Using gherkin 2.12.2
Using multi_test 0.1.2
Using cucumber 1.3.19
Using rspec - expectations 2.99.2
Using aruba 0.6.2
Using bcrypt 3.1.10
Using bundler 1.10.6
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using xpath 2.0.0
Using capybara 2.4.4
Using coderay 1.1.0
Using thor 0.19.1
Using railties 4.0.13
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.12.3
Using sprockets - rails 2.2.4
Using rails 4.0.13
Using cucumber - rails 1.4.2
Using docile 1.1.5
Using factory_girl 4.5.0
Using factory_girl_rails 4.5.0
Using fivemat 1.2.1
Using rkelly - remix 0.0.6
Using jsobfu 0.2.1
Using json 1.8.3
Using metasm 1.0.2
Installing metasploit - concern 1.0.0

Gem::InstallError: metasploit - concern requires Ruby version >= 2.1.
An error occurred
while installing metasploit - concern(1.0.0), and Bundler
cannot
continue.
Make sure that `gem install metasploit-concern -v '1.0.0'`
succeeds before
bundling.

so at it says that I should install metasploit-concern v 1.0.0

I then tried using both of the following codes gem install metasploit-concern -v '1.0.0' and gem install metasploit-concern

ERROR:  Error installing metasploit-concern:
    metasploit-concern requires Ruby version >= 2.1.

so then I tried installing Ruby 2.1 and ruby

root@raspberrypi:~/msf3# gem install Ruby -v '2.1' ERROR: Could not find a valid gem 'Ruby' (= 2.1) in any repository ERROR: Possible alternatives: ruby

root@raspberrypi:~/msf3# gem install ruby ERROR: Could not find a valid gem 'ruby' (>= 0) in any repository ERROR: Possible alternatives: ruby

and now as you can see its a loophole and I am stuck

ps * Already installed ruby-dev too * Tried switching every time between R uby and r uby * At bundling it says (using) instead of (installing) because I tried rerunning the bundle to see if it could work) * I also tried sourcing gem sources -a https://rubygems.org . and gem sources -a https://rubygems.org

I tried to give all the information possible maybe it's useful and maybe it is not.. just in case

I would highly appreciate the help Thanks in advance

Cheers Bandar

Ruby is not a gem. Ruby is the programming language.

What the error is telling you is that the version of Ruby that you have on your machine (try running ruby --version ) is below that which the application you are trying to install requires.

I'm not familiar with Metasploit in particular, but your options seem to be:

  1. to try upgrading what you have installed ( apt-get update && apt-get upgrade ),

  2. if you are on the latest version of Ruby available in the repositories, to try using a Ruby version manager (my preference is rbenv, but each has its advantages), or

  3. to compile Ruby from source .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM