网安工具系列【亲测有效】:Metasploit使用msfconsole命令启动时,报错‘/usr/share/metasploit-framework/......’

218 篇文章 ¥299.90 ¥399.90




Metasploit使用msfconsole命令启动时,报错‘/usr/share/metasploit-framework/…’

摘要

本文介绍了在遇到msfconsole启动问题时,通过更新apt程序库、安装Metasploit框架并重启工具,成功解决问题的方法。

报错

当使用msfconsole命令启动时,msf无法启动,且报错:

在这里插入图片描述

解决办法:

1. 更新apt程序库

apt-get update

我在Ubuntu上安装msfconsole时,报了如下错误: root@master:/# msfconsole This copy of metasploit-framework is more than two weeks old. Consider running 'msfupdate' to update to the latest version. <internal:dir>:184:in 'Dir.open': Permission denied @ dir_initialize - /usr/lib/modules/6.14.0-33-generic/build (Errno::EACCES) from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Dir.foreach' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:60:in 'block in Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Dir.foreach' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:60:in 'block in Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Dir.foreach' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:60:in 'block in Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Dir.foreach' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:50:in 'Bootsnap::LoadPathCache::PathScanner.walk' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path_scanner.rb:38:in 'Bootsnap::LoadPathCache::PathScanner.call' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path.rb:93:in 'Bootsnap::LoadPathCache::Path#scan!' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/path.rb:77:in 'Bootsnap::LoadPathCache::Path#entries_and_dirs' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:172:in 'block (2 levels) in Bootsnap::LoadPathCache::Cache#unshift_paths_locked' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:165:in 'Array#reverse_each' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:165:in 'block in Bootsnap::LoadPathCache::Cache#unshift_paths_locked' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/store.rb:53:in 'block in Bootsnap::LoadPathCache::Store#transaction' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/store.rb:52:in 'Thread::Mutex#synchronize' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/store.rb:52:in 'Bootsnap::LoadPathCache::Store#transaction' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:164:in 'Bootsnap::LoadPathCache::Cache#unshift_paths_locked' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:113:in 'block in Bootsnap::LoadPathCache::Cache#unshift_paths' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:113:in 'Thread::Mutex#synchronize' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/cache.rb:113:in 'Bootsnap::LoadPathCache::Cache#unshift_paths' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/change_observer.rb:22:in 'unshift' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/railties-7.2.2.1/lib/rails/application.rb:405:in 'Rails::Application.add_lib_to_load_path!' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/railties-7.2.2.1/lib/rails/application.rb:75:in 'Rails::Application.inherited' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/framework/config/application.rb:57:in '<module:Framework>' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/framework/config/application.rb:56:in '<module:Metasploit>' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/framework/config/application.rb:55:in '<top (required)>' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/framework/config/environment.rb:2:in '<top (required)>' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/framework/lib/msfenv.rb:28:in '<top (required)>' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' from /snap/metasploit-framework/2173/opt/metasploit-framework/embedded/lib/ruby/gems/3.4.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require' from /snap/metasploit-framework/2173/opt/metasploit-framework/bin/../embedded/framework/msfconsole:21:in '<main>'
最新发布
10-08
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坦笑&&life

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值