Ruby on rails Metasploit更新:捆绑包安装中出错(nokogiri 1.6.8)
Metasploit工作正常,直到今天早上我用Ruby on rails Metasploit更新:捆绑包安装中出错(nokogiri 1.6.8),ruby-on-rails,ruby,linux,bundle,metasploit,Ruby On Rails,Ruby,Linux,Bundle,Metasploit,Metasploit工作正常,直到今天早上我用msfupdate更新它,然后一切都正常了 现在键入msfconsole会出现以下错误: Could not find nokogiri-1.6.8 in any of the sources Run bundle install to install missing gems. 我去输入了bundle install。在这之前一切都很顺利: Installing nokogiri 1.6.8 with native extensions Gem:
msfupdate
更新它,然后一切都正常了
现在键入msfconsole
会出现以下错误:
Could not find nokogiri-1.6.8 in any of the sources
Run bundle install to install missing gems.
我去输入了bundle install
。在这之前一切都很顺利:
Installing nokogiri 1.6.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.2 -r ./siteconf20160831-24032-1wim46x.rb extconf.rb --use-system-libraries
Using pkg-config version 1.1.7
checking if the C compiler accepts ... yes
Building nokogiri using system libraries.
checking for libxml-2.0... no
checking for libxslt... no
checking for libexslt... no
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
--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=/usr/bin/$(RUBY_BASE_NAME)2.2
--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-pkg-config
--without-pkg-config
--with-override-variables
--without-override-variables
--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-pkg-config
--without-pkg-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
--with-pkg-config
--without-pkg-config
extconf failed, exit code 1
Gem files will remain installed in /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.8 for inspection.
Results logged to /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/extensions/x86-linux/2.2.0/nokogiri-1.6.8/gem_make.out
Using rack-test 0.6.3
Using faraday 0.9.2
Using jsobfu 0.4.1
Using packetfu 1.1.11
Using rex-arch 0.1.1
Using rex-ole 0.1.2
Using rex-random_identifier 0.1.0
Using rex-zip 0.1.0
Using simplecov 0.12.0
Using activesupport 4.2.7.1
Using tzinfo-data 1.2016.6
An error occurred while installing nokogiri (1.6.8), and Bundler cannot
continue.
Make sure that gem install nokogiri -v '1.6.8' succeeds before bundling.
我开始搜索,结果发现,这建议我应该运行bundle config build.nokogiri——使用系统库
但同样,什么也没有。我还尝试了gem安装nokogiri-v1.6.8
。我还尝试了更旧的版本:gem安装nokogiri-v1.6.0
我在用卡利
编辑:我认为解决办法是重新安装Kali;我从这一切中学到的一件事是永远不要更新MSF:D@RUser98-- 我在Unix Stack Exchange站点上找到了这个答案,也许它会对您有所帮助 如果安装nokogiri-1.6.8时出错,请尝试:
sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev --yes
资料来源:
每次在Kali上安装/更新Metasploit时,我都会遇到很多问题,因此我感觉到您的痛苦如果您在尝试安装Nokogiri时在MacOS上遇到此问题,您可以运行
xcode select--install
并重试:)首先我尝试了以下方法:-
sudo apt-get install make
sudo apt-get install ruby-dev
sudo gem install nokogiri -v '1.10.7' --source 'https://rubygems.org/'
安装nogogiri gem后,我进入metasploit framework目录,我的示例是:-
cd/usr/share/metasploit框架
并键入:-
sudo bundle install
一切都进行得很顺利,直到我遇到一个“pg”gem安装错误。
这解决了错误:-
sudo apt-get install libpq-dev
sudo gem install pg -v '0.21.0' --source 'https://rubygems.org/'
sudo bundle install
我再次遇到另一个名为“pcaprub”的gem安装错误
这就解决了这个问题:-
sudo apt install libpcap-dev
sudo gem install pcaprub -v '0.13.0' --source 'https://rubygems.org/'
sudo bundle install
好的,现在它变得非常令人沮丧,因为再次发生了另一个错误,这次是'sqlite3'gem,它可以通过以下方式修复:-
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3 -v '1.3.13' --source 'https://rubygems.org/'
sudo bundle install
啊!!最后,Metasploit已启动并运行
Bundle complete! 14 Gemfile dependencies, 144 gems now installed.
你能在这里给出你的gemfile和ruby版本吗?@Santoshharma不知道怎么做(我是新手),你能告诉我怎么做吗?请看这里给出的链接。在该问题中,gemfile Available我投票将此问题作为主题外的问题结束,因为这是关于使用非编程工具的问题,对于编程问题也是如此。投票上升是因为这导致
捆绑安装
工作正常,但是我在运行msfconsole时仍然会遇到错误,如果您发布了错误和解决方案,可能对其他人仍有帮助;)不管怎样,修好它都很不错!