SSL Error During Gem Installation (on MinGW64-MSys2)

谁说我不能喝 提交于 2019-12-08 06:24:01

问题


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)


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/27668472/ssl-error-during-gem-installation-on-mingw64-msys2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!