Search code examples
ubunturvmmetasploit

Installation of metasploit on Ubuntu 16.04


I am trying to install metasploit on Ubuntu 16.04. I tried installing the dependencies using command

sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems

but getting the error below

Building dependency tree       
Reading state information... Done
Note, selecting 'ruby' instead of 'irb'
Note, selecting 'ruby' instead of 'rubygems'
Package libopenssl-ruby is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libopenssl-ruby' has no installation candidate
E: Unable to locate package libyaml-ruby
E: Unable to locate package libdl-ruby
E: Unable to locate package libiconv-ruby
E: Unable to locate package libreadline-ruby 

i also tried installing rvm using command

 \curl -L https://get.rvm.io | bash -s stable

but it also give following error

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: get.rvm.io

can anyone suggest a solution for this?


Solution

  • I've had this problem before and I had to add a ruby resource/repository to download the ruby modules from. You should add the kali linux repositories to your resource file.

    darkoperator gives alternative examples to help you:

    http://www.darkoperator.com/installing-metasploit-in-ubunt/