简体   繁体   English

即使在Ubuntu 14.04上的gem更新系统之后也无法从https://rubygems.org/获取数据

[英]Unable to get data from https://rubygems.org/ even after gem update system on ubuntu 14.04

Problem: after gem sources -a https://rubygems.org/ 问题: gem sources -a https://rubygems.org/

Error shown: 显示错误:

Error fetching https://rubygems.org/: 
Errno::ECONNRESET: Connection reset by peer - SSL_connect
(https://api.rubygems.org/specs.4.8.gz)

Background: Looking to learn some RoR, I installed Ubuntu 14.04, and then followed https://gorails.com/setup/ubuntu/14.04 to install RoR. 背景:为了学习一些RoR,我安装了Ubuntu 14.04,然后按照https://gorails.com/setup/ubuntu/14.04安装RoR。 I ran into problems with bundle install due to https://rubygems.org/ not working, so I took the advice from bundle install fails with SSL certificate verification error and SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/ to change the gem source to http://rubygems.org/ 由于https://rubygems.org/无法正常工作,我遇到了捆绑安装问题,因此我从捆绑安装失败的建议中获取了SSL证书验证错误SSL错误。安装rubygems时,无法从'https:/获取数据/rubygems.org/将gem来源更改为http://rubygems.org/

However, I was unable to change the gem source back to https://rubygems.org/ even after gems update --system and gems update (In the meantime, I completed the installation of RoR by attempting to rails new myApp and installing the missing gem every time bundle install failed, which took a very long time). 但是,即使在gems update --systemgems update之后,我也无法将gem源更改回https://rubygems.org/ (与此同时,我通过尝试使用rails new myApp并安装了rails new myApp来完成RoR的安装。每次捆绑安装失败都会丢失宝石,这需要很长时间。

Suspecting the openssl to be the culprit, I tried to download the latest openssl certificate (1.0.2d) directly and followed another tutorial to install it. 我怀疑是openssl的罪魁祸首,我试图直接下载最新的openssl证书(1.0.2d),然后按照另一个教程进行安装。 However, the tutorial didn't mention specifically where to install it to, and so openssl version remained at 1.0.1f 6 Jan 2014 . 但是,本教程并未特别提及将其安装到何处,因此openssl version仍为1.0.1f 6 Jan 2014 Following this I tried https://superuser.com/questions/740930/apt-get-upgrade-openssl-wont-bring-ubuntu-12-04-to-latest-version and https://askubuntu.com/questions/429385/upgrade-openssl-on-ubuntu-12-04 , purged openssl and re-installed the original openssl that came with the os by apt-get install openssl , having read from somewhere else that this shouldn't be a problem. 在此之后,我尝试了https://superuser.com/questions/740930/apt-get-upgrade-openssl-wont-bring-ubuntu-12-04-to-latest-versionhttps://askubuntu.com/questions/ 429385 / upgrade-openssl-on-ubuntu-12-04 ,清除aptsl并通过apt-get install openssl重新安装了os附带的原始openssl,从其他地方了解到这应该不是问题。 https://askubuntu.com/questions/449184/how-to-upgrade-openssl-1-0-1f-on-ubuntu-server-14-04 https://askubuntu.com/questions/449184/how-to-upgrade-openssl-1-0-1f-on-ubuntu-server-14-04

Unfortunately, http://railsapps.github.io/openssl-certificate-verify-failed.html also failed to solve the problem, since I'm using ubuntu instead of OSX, and rbenv instead of rvm (indeed it specifically states that versions newer than Ubuntu 12.04 should not have the problem, and I don't know what to do with the openssl 1.0.1-4ubuntu5 package it suggested as a fix. 不幸的是, http: //railsapps.github.io/openssl-certificate-verify-failed.html也未能解决问题,因为我使用的是ubuntu而不是OSX,并且使用rbenv而不是rvm(实际上它明确指出了该版本比Ubuntu 12.04更新的版本应该没有问题,而且我不知道该怎么解决作为建议的openssl 1.0.1-4ubuntu5软件包。

Install rvm first.Then execute the following commands: 1.gem update --system 2.rvm osx-ssl-certs update all 首先安装rvm,然后执行以下命令:1.gem update --system 2.rvm osx-ssl-certs更新所有

First command will fetch the updates . 第一条命令将获取更新。 Second will update the ssl certificates 其次将更新ssl证书

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM