Metasploit - ERROR: cannot discover where libxml2 is located on your system

metasploit-framework [rapid7-master] ->> rvm list

rvm rubies

=* ruby-2.3.3 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

When ruby is updated from ruby-2.3.1 to ruby-2.3.3. It will make errors as follow.

metasploit-framework [rapid7-master] ->> bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 11.3.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.10.1
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using arel 6.0.3
Using public_suffix 2.0.4
Using ffi 1.9.14
Using contracts 0.14.0
Using gherkin 4.0.0
Using cucumber-wire 0.0.1
Using diff-lcs 1.2.5
Using multi_json 1.12.1
Using multi_test 0.1.2
Using rspec-support 3.5.0
Using thor 0.19.4
Using bcrypt 3.1.11
Using bit-struct 0.15.0
Using mime-types-data 3.2016.0521
Using coderay 1.1.1
Using docile 1.1.5
Using multipart-post 2.0.0
Using filesize 0.1.1
Using fivemat 1.3.2
Using rkelly-remix 0.0.6
Using metasm 1.0.2
Using pg 0.19.0
Using pg_array_parser 0.0.9
Using rubyntlm 0.6.1
Using rubyzip 1.2.0
Using metasploit-payloads 1.2.3
Using metasploit_payloads-mettle 0.1.3
Using msgpack 1.0.2
Using nessus_rest 0.1.6
Using net-ssh 3.2.0
Using network_interface 0.0.1
Using openssl-ccm 1.2.1
Using openvas-omp 0.0.4
Using pcaprub 0.12.4
Using patch_finder 1.0.2
Using rb-readline-r7 0.5.2.0
Using redcarpet 3.3.4
Using rex-text 0.2.9
Using rex-core 0.1.3
Using rex-struct2 0.1.0
Using rex-java 0.1.3
Using rex-registry 0.1.1
Using robots 0.10.1
Using sqlite3 1.3.12
Using sshkey 1.8.0
Using windows_error 0.0.2
Using method_source 0.8.2
Using slop 3.6.0
Using simplecov-html 0.10.0
Using timecop 0.8.1
Using yard 0.9.5
Using bundler 1.13.6
Using tzinfo 1.2.2
Installing nokogiri 1.6.8.1 with native extensions
Using rack-test 0.6.3
Using addressable 2.5.0
Using childprocess 0.5.9
Using cucumber-core 1.5.0
Using rspec-expectations 3.5.0
Using rspec-core 3.5.4
Using rspec-mocks 3.5.0
Using mime-types 3.1
Using faraday 0.10.0
Using jsobfu 0.4.1
Using packetfu 1.1.11
Using rex-arch 0.1.2
Using rex-mime 0.1.1
Using rex-ole 0.1.3
Using rex-random_identifier 0.1.1
Using rex-zip 0.1.1
Using rex-rop_builder 0.1.1
Using rex-socket 0.1.2
Using pry 0.10.4
Using simplecov 0.12.0
Using activesupport 4.2.7.1
Using tzinfo-data 1.2016.10
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/seclab/.rvm/gems/ruby-2.3.3@metasploit-framework/gems/nokogiri-1.6.8.1/ext/nokogiri
/Users/seclab/.rvm/rubies/ruby-2.3.3/bin/ruby -r ./siteconf20161206-46534-atycag.rb extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using system libraries.
ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
*** 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
    --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=/Users/seclab/.rvm/rubies/ruby-2.3.3/bin/$(RUBY_BASE_NAME)
    --help
    --clean
    --use-system-libraries
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --with-xml2-dir
    --without-xml2-dir
    --with-xml2-include
    --without-xml2-include=${xml2-dir}/include
    --with-xml2-lib
    --without-xml2-lib=${xml2-dir}/lib
    --with-libxml-2.0-config
    --without-libxml-2.0-config
    --with-pkg-config
    --without-pkg-config
    --with-xslt-dir
    --without-xslt-dir
    --with-xslt-include
    --without-xslt-include=${xslt-dir}/include
    --with-xslt-lib
    --without-xslt-lib=${xslt-dir}/lib
    --with-libxslt-config
    --without-libxslt-config
    --with-exslt-dir
    --without-exslt-dir
    --with-exslt-include
    --without-exslt-include=${exslt-dir}/include
    --with-exslt-lib
    --without-exslt-lib=${exslt-dir}/lib
    --with-libexslt-config
    --without-libexslt-config

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/seclab/.rvm/gems/ruby-2.3.3@metasploit-framework/extensions/x86_64-darwin-16/2.3.0/nokogiri-1.6.8.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/seclab/.rvm/gems/ruby-2.3.3@metasploit-framework/gems/nokogiri-1.6.8.1 for inspection.
Results logged to /Users/seclab/.rvm/gems/ruby-2.3.3@metasploit-framework/extensions/x86_64-darwin-16/2.3.0/nokogiri-1.6.8.1/gem_make.out

An error occurred while installing nokogiri (1.6.8.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.8.1'` succeeds before bundling.
metasploit-framework [rapid7-master] ->> xcode-select --install
xcode-select: note: install requested for command line developer tools
metasploit-framework [rapid7-master] ->> gem install nokogiri -v '1.6.8.1'
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.8.1
Parsing documentation for nokogiri-1.6.8.1
Installing ri documentation for nokogiri-1.6.8.1
Done installing documentation for nokogiri after 2 seconds
1 gem installed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值