Gem 安装 jekyll 遇到 “certificate verify failed” 问题解决办法

来源:互联网 发布:linux是应用软件吗 编辑:程序博客网 时间:2024/05/31 13:15

问题现象

今天用 Gem 安装 jekyll 时,遇到如下错误:

C:\Users\Apple>gem install jekyllERROR:  Could not find a valid gem 'jekyll' (>= 0), here is why:          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

解决办法

  1. 下载 https://curl.haxx.se/ca/cacert.pem ,并保存到本地: C:\Ruby22-x64
  2. 添加环境变量: SET SSL_CERT_FILE=C:\Ruby22-x64\cacert.pem
  3. 重新执行安装命令:
C:\Users\Apple>gem install jekyllFetching: forwardable-extended-2.6.0.gem (100%)Successfully installed forwardable-extended-2.6.0Fetching: pathutil-0.16.0.gem (100%)Successfully installed pathutil-0.16.0Fetching: liquid-4.0.0.gem (100%)Successfully installed liquid-4.0.0Fetching: kramdown-1.15.0.gem (100%)Successfully installed kramdown-1.15.0Fetching: colorator-1.1.0.gem (100%)Successfully installed colorator-1.1.0Fetching: jekyll-3.6.2.gem (100%)Successfully installed jekyll-3.6.2Parsing documentation for forwardable-extended-2.6.0Installing ri documentation for forwardable-extended-2.6.0Parsing documentation for pathutil-0.16.0Installing ri documentation for pathutil-0.16.0Parsing documentation for liquid-4.0.0Installing ri documentation for liquid-4.0.0Parsing documentation for kramdown-1.15.0Installing ri documentation for kramdown-1.15.0Parsing documentation for colorator-1.1.0Installing ri documentation for colorator-1.1.0Parsing documentation for jekyll-3.6.2Installing ri documentation for jekyll-3.6.2Done installing documentation for forwardable-extended, pathutil, liquid, kramdown, colorator, jekyll after 10 seconds 6 gems installed

参考

How to solve “certificate verify failed” on Windows?

阅读全文
0 0
原创粉丝点击