BackTrack 5 R3 Metasploit更新方法及msfupdae,msconsole出错解决办法
2013-11-27 01:15
579 查看
更新Metasploit最新版本:
#cd /opt/metasploit/
#rm -rf msf3
#git clone --depth=1 git://github.com/rapid7/metasploit-framework msf3
执行msfupdate出错如下:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/opt/metasploit/ruby/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /opt/metasploit/postgresql/bin/pg_config
checking for libpq-fe.h... *** 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=/opt/metasploit/ruby/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
/opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
from extconf.rb:43:in `<main>'
Gem files will remain installed in /opt/metasploit/ruby/lib/ruby/gems/1.9.1/gems/pg-0.15.0 for inspection.
Results logged to /opt/metasploit/ruby/lib/ruby/gems/1.9.1/gems/pg-0.15.0/ext/gem_make.out
An error occured while installing pg (0.15.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.0'` succeeds before bundling.
执行msfconsole出错如下:
Could not find pg-0.15.0 in any of the sources
Run `bundle install` to install missing gems.
执行bundle install出错如下:
An error occured while installing pg (0.15.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.0'` succeeds before bundling.
搜索国外论坛总结下完整的BackTrack 5 R3 Metasploit更新方法, 以备后用:
#cd /opt/metasploit/
#rm -rf msf3
#git clone --depth=1 git://github.com/rapid7/metasploit-framework msf3
修改文件:
32位:/opt/metasploit/ruby/lib/ruby/1.9.1/i686-linux/rbconfig.rb
64位:/opt/metasploit/ruby/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
找到CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static"
改为CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) "
然后执行(一定要在/opt/metasploit/msf3目录下执行):
#cd /opt/metasploit/msf3
#./msfupdate
执行上面命令后会自动检查安装更新msf3所依赖的ruby模块,更新Metasploit一直出错在pg-0.15.0的问题迎刃而解@@
附更新后数据库错误问题解决办法:
#cd /opt/metasploit/
#rm -rf msf3
#git clone --depth=1 git://github.com/rapid7/metasploit-framework msf3
执行msfupdate出错如下:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/opt/metasploit/ruby/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /opt/metasploit/postgresql/bin/pg_config
checking for libpq-fe.h... *** 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=/opt/metasploit/ruby/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
/opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /opt/metasploit/ruby/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
from extconf.rb:43:in `<main>'
Gem files will remain installed in /opt/metasploit/ruby/lib/ruby/gems/1.9.1/gems/pg-0.15.0 for inspection.
Results logged to /opt/metasploit/ruby/lib/ruby/gems/1.9.1/gems/pg-0.15.0/ext/gem_make.out
An error occured while installing pg (0.15.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.0'` succeeds before bundling.
执行msfconsole出错如下:
Could not find pg-0.15.0 in any of the sources
Run `bundle install` to install missing gems.
执行bundle install出错如下:
An error occured while installing pg (0.15.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.0'` succeeds before bundling.
搜索国外论坛总结下完整的BackTrack 5 R3 Metasploit更新方法, 以备后用:
#cd /opt/metasploit/
#rm -rf msf3
#git clone --depth=1 git://github.com/rapid7/metasploit-framework msf3
修改文件:
32位:/opt/metasploit/ruby/lib/ruby/1.9.1/i686-linux/rbconfig.rb
64位:/opt/metasploit/ruby/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
找到CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static"
改为CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) "
然后执行(一定要在/opt/metasploit/msf3目录下执行):
#cd /opt/metasploit/msf3
#./msfupdate
执行上面命令后会自动检查安装更新msf3所依赖的ruby模块,更新Metasploit一直出错在pg-0.15.0的问题迎刃而解@@
附更新后数据库错误问题解决办法:
msf > search ms13 [!] Database not connected or cache not built, using slow search msf > db_rebuild_cache [*] Purging and rebuilding the module cache in the background...
相关文章推荐
- Kali和Backtrack中更新metasploit后无法连接数据库的问题解决方法
- Eclipse更新插件出错的解决方法
- Caffe搭建:常见问题解决办法和ubuntu使用中遇到问题解决方法(持续更新)
- MyEclipse8.5安装jbpm4.3插件更新至Myeclipse8.6出错的解决办法
- ubuntu14.04源无法更新--jdk安装出错解决方法
- gem更新出错时候的解决办法
- 卡巴斯基6.0更新出错的解决方法
- NOD32更新时“创建临时文件名时出错”的解决方法
- oracle启动 /停止的几种方法以及 启动和停止过程中出错的解决办法
- 安装SQL Server 2016出错提示:需要安装oracle JRE7 更新 51(64位)或更高版本问题的解决方法
- js调用flex中as方法出错的解决办法
- sublime text 3 取消自动检查更新的解决办法以及注册的方法
- win10系统更新KB3124263补丁出错的原因以及解决方法
- excel第一次打开报错 向程序发送命令时出错 多种解决办法含终极解决方法
- Hibernate的方法获取对象后,对象调用set后会自动更新数据库内容的解决办法
- 关于linux(CentOS)无法更新安装软件出错的解决办法(提示The program package-cleanup is found in the yum-utils package)
- 转:iTunes10.7更新,xCode 安装Mobile Device Framework出错的问题的解决方法
- getHibernateTemplate().update()方法更新不了解决办法
- js调用flex中as方法出错的解决办法
- Visual Studio 2010 更新NuGet Package Manager出错解决办法