SSL Error During Gem Installation (on MinGW64-MSys

2019-06-06 09:11发布

I'm using a MinGW64-MSys2 environment. When I try to install a package with gem install <package name> I get something like this SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)

2条回答
SAY GOODBYE
2楼-- · 2019-06-06 09:49

Depends on what shell you use msys or mingw* and what ruby you use you need install ca-certificates package:

pacman -S mingw-w64-i686-ca-certificates

or

pacman -S mingw-w64-x86_64-ca-certificates

or

pacman -S ca-certificates
查看更多
神经病院院长
3楼-- · 2019-06-06 10:09

Try downloading the http://curl.haxx.se/ca/cacert.pem certificate. Then, point a special environment variable to it like that: export SSL_CERT_FILE=~/cacert.pem After that, issue an update command: gem update --system The problem should be solved after that. Relaunch the console and continue your work.

查看更多
登录 后发表回答