как исправить установку гема network_interface на windows

когда я хочу запустить msfconsole, я вижу эту ошибку:

f:\metasploit\apps\pro\msf3>ruby msfconsole Не удалось найти network_interface-0.0.1 ни в одном из источников. Запустите bundle install, чтобы установить отсутствующие драгоценные камни.

когда я выполняю установку "bundle":

f:\metasploit\apps\pro\msf3>bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies.....
Using rake 10.4.2
Using i18n 0.6.11
Using multi_json 1.0.4
Using activesupport 3.2.21
Using builder 3.0.4
Using activemodel 3.2.21
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.3
Using actionpack 3.2.21
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.21
Using arel 3.0.3
Using tzinfo 0.3.42
Using activerecord 3.2.21
Using activeresource 3.2.21
Using arel-helpers 2.1.0
Using ffi 1.9.3
Using childprocess 0.5.3
Using diff-lcs 1.2.5
Using json 1.8.1
Using gherkin 2.11.6
Using cucumber 1.2.1
Using rspec-expectations 2.99.2
Using aruba 0.6.1
Using bcrypt 3.1.10
Using bundler 1.9.0
Using mini_portile 0.6.1
Using nokogiri 1.6.5
Using xpath 2.0.0
Using capybara 2.4.1
Using coderay 1.1.0
Using rack-ssl 1.3.4
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.21
Using rails 3.2.21
Using cucumber-rails 1.4.0
Using factory_girl 4.4.0
Using factory_girl_rails 4.4.1
Using fivemat 1.2.1
Using rkelly-remix 0.0.6
Using jsobfu 0.2.1
Using metasploit-concern 0.3.0
Using metasploit-model 0.29.0
Using pg 0.18.1
Using recog 1.0.16
Using metasploit_data_models 0.22.8
Using rubyntlm 0.4.0
Using rubyzip 1.1.7
Using metasploit-credential 0.13.19
Using meterpreter_bins 0.0.14
Using msgpack 0.5.11
Using packetfu 1.1.9
Using robots 0.10.1
Using sqlite3 1.3.10
Using metasploit-framework 4.11.0.pre.dev from source at .
Using metasploit-framework-db 4.11.0.pre.dev from source at .

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    F:/metasploit/ruby/bin/ruby.exe -r ./siteconf20150321-6764-d3wiyv.rb extcon
.rb

[*] Running checks for netifaces code...
checking for main() in -lws2_32... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=F:/metasploit/ruby/bin/ruby
        --with-ws2_32lib
        --without-ws2_32lib
F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed
o generate an executable file. (RuntimeError)
You have to install development tools first.
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_li
rary'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:918:in `block in checkin
_for'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels)
in postpone'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpon
'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
        from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
        from extconf.rb:17:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in F:/metasploit/ruby/lib/ruby/gems/2.1.0/gems/
etwork_interface-0.0.1 for inspection.
Results logged to F:/metasploit/ruby/lib/ruby/gems/2.1.0/extensions/x86-mingw32
2.1.0/network_interface-0.0.1/gem_make.out
An error occurred while installing network_interface (0.0.1), and Bundler canno

continue.
Make sure that `gem install network_interface -v '0.0.1'` succeeds before
bundling.

f:\metasploit\apps\pro\msf3>

Как я могу исправить эту ошибку? Спасибо


person unbl0ck3r    schedule 21.03.2015    source источник


Ответы (1)


  1. cd /usr/share/metasploit-framework
  2. apt-get установить postgresql-server-dev-all
  3. apt-get установить libsqlite3-dev
  4. гем установить pg -v 0.18.1
  5. пакетная установка
person Night Fury    schedule 01.04.2015
comment
достойный ответ, но также требуется некоторое объяснение. например, как это относится к network_interface-0.0.1 - person Martin Serrano; 02.04.2015