BackTrack 5 R3 Metasploit更新方法及msfupdae,msconsole出错解决办法
更新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出错如下:
Run `bundle install` to install missing gems.
执行bundle install出错如下:
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...
BackTrack 5 R3 Metasploit更新方法及msfupdae,msconsole出错解决办法的更多相关文章
- [转]Linux df 命令不更新磁盘数据空间使用情况的解决办法
当你已经找出并remove掉Linux系统中的大容量文件时,然后使用df -h查看使用情况依旧不变时.可尝试如下方法解决 1.找出那个进程占用了哪些已删除的文件 # 查看哪些被文件还在被哪个进程占用 ...
- tk.mybatis通用插件updateByPrimaryKeySelective无法自动更新ON UPDATE CURRENT_TIMESTAMP列的解决办法
tk.mybatis是一个很好用的通用插件,把CRUD这些基本的数据操作全都用动态SQL语句自动生成了,mapper和xml里十分清爽,但是昨天发现有一个小坑,记录在此: 有一张表,结构如下(已经简化 ...
- pymysql_mysql密码重置方法,连接局域网数据库的解决办法
https://blog.csdn.net/qq_37176126/article/details/72824106 pymysql模块的操作 https://blog.csdn.net/skh2 ...
- youtube-dl更新出错解决办法
youtube-dl更新命令: youtube-dl -U 更新报错:无法识别当前版本 ERROR: can't find the current version. Please try again ...
- AFNetworking 3.0中调用[AFHTTPSessionManager manager]方法导致内存泄漏的解决办法
在使用AFNetworking3.0框架,使用Instruments检查Leaks时,检测到1000多个内存泄漏的地方,定位到 [AFHTTPSessionManager manager] 语句中,几 ...
- UnitOfWork 更新实体出错解决办法
用UnitOfWork进行实体更新的时候,再查询实体一次,再去更新的时候会报如下错误: Attaching an entity of type 'TinyFrame.Data.DomainModel. ...
- SVN更新的时候报断言失败解决办法
解决办法:没啥好方法,重新检出代码就好使了.
- xml 方式更新和获取 配置文件 appSettings 节点 解决办法
最近在搞一个小程序,会用到动态修改配置文件来进行处理,在百度上找了很多办法,但是始终达不到我预想的效果,先列出程序运行环境和开发工具版本: 开发工具:VS2010 .Net 运行环境:4.0 有两种方 ...
- Visual Studio 2010 更新NuGet Package Manager出错解决办法
在Visual Studio 2010的扩展管理器中发现NuGet Package Manger有最新版本更新提示,选择更新安装提示以下错误信息: 2013/4/25 1:11:48 - Micros ...
随机推荐
- js实现url链接encode加密
function urlencode(clearString) { var output = ''; var x = 0; clearString = utf16to8(clearString.toS ...
- JavaScript中以构造函数的方式调用函数
转自:http://www.cnblogs.com/Saints/p/6012188.html 构造器函数(Constructor functions)的定义和任何其它函数一样,我们可以使用函数声明. ...
- Idea 设置根目录
1.在根目录下新建一个目录yx360-war-ctm-tea,在该目录下新建一个build.gradle文件,输入: apply plugin: 'war' 来引入war插件,war插件会在项目的目录 ...
- CentOS 7 BIND 主从搭建
主机 10.2.0.15 从机 10.2.0.14 1 主机配置$vim /etc/named.bodani.com.zones zone"bodani.com" IN { typ ...
- 【转载】CentOS 6.4下PXE+Kickstart无人值守安装操作系统
[转载]CentOS 6.4下PXE+Kickstart无人值守安装操作系统 转自:CentOS 6.4下PXE+Kickstart无人值守安装操作系统 - David_Tang - 博客园 http ...
- unknown filesystem type ‘iso9660’类型问题--Ubuntu
unknown filesystem type ‘iso9660’是指系统不支持这种类型的文件, 用以下命令更新内核即可: sudo aptitude update sudo aptitude upg ...
- url重写步骤
url重写:在global文件中,在application_BeginRequest事件中1:获取URL string url=Request.AppRelativeCurrentExecutionF ...
- 设计模式二 适配器模式 adapter
适配器模式的目的:如果用户需要使用某个类的服务,而这项服务是这个类用一个不同的接口提供的,那么,可以使用适配器模式为客户提供一个期望的接口.
- mongostat
监控MongoDB有一下几种方法: 1)使用MongoDB软件包自带的工具,如mongostat,mongotop等.2)使用MongoDB数据库命令3)使用MongoDB公司提供的MMS监控服务 m ...
- 2.2 sikuli中编程运行
http://www.cnblogs.com/Flint/p/4951703.html a.如果需要指定点击的具体坐标,需要使用click(patten.targetoffset(x, y)). b. ...