打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
gem install bundler SSL证书错误 解决办法

最近在windows10电脑上装上PentestBox后,直接用“msfconsole”命令启动metasploit时,却发现需要先让我执行ruby中的“gem install bundler”命令,意思是先让我安装一个bundler,结果却报了如下错误:

ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local tr sted storeERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local tr sted storeERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local tr sted storeERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
          Unable to download data from https://gems.ruby-china.com/ - SSL_connect retu ned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certi icate) (https://gems.ruby-china.com/specs.4.8.gz)ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local tr sted storeERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local tr sted store

解决办法

正常情况下,你是不会遇到 SSL 证书错误的,除非你的 Ruby 安装方式不正确。

如果遇到 SSL 证书问题,你又无法解决。

Linux上,请修改 ~/.gemrc 文件,增加 ssl_verify_mode: 0 配置,以便于 RubyGems 可以忽略 SSL 证书错误。

windows上, .gemrc 存放在: c:\用户\你的账户 下面,也就是类似于:C:\Users\fujie下面。

以下是我修改成功后再去执行“gem install bundler”命令的结果,以下结果,说明安装成功了,已经解决了这个SSL证书ERROR的问题。

ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted storeFetching: bundler-2.0.1.gem (100%)Successfully installed bundler-2.0.1(已成功安装bundler-2.0.1)Parsing documentation for bundler-2.0.1(解析bundler-2.0.1的文档)Installing ri documentation for bundler-2.0.1(安装bundler-2.0.1的ri文档)Done installing documentation for bundler after 5 seconds(5秒后完成为bundler安装文档)1 gem installed

注意:

如果你操作此步骤后已经成功后,再去执行“msfconsole“,你会发现照样启动不了。还是提示需要你安装bundler(gem install bundler),还出现这个问题多半的原因是因为你的电脑上还装有其它版本的ruby,你可以看一下你的ruby版本是否是用的PentestBox里面的ruby?(cmd窗口执行:ruby -v );如果不是,请自我修改。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
在 windows 安装 Jekyll
Node.js TLSSocket 库里涉及到的证书链的概念简介
RubyGems 镜像
GitLab 安装问题小记
Gemfile 详解
制作自己的gem:使用bundler产生结构的方法
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服