无法在Mac上安装HomeBrew

问题描述:

我只是真的需要安装Sass。但随后导致了这个错误:无法在Mac上安装HomeBrew

ERROR: Could not find a valid gem 'sass' (>= 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://rubygems.org/latest_specs.4.8.gz) 

我的红宝石版本是:

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] 

我rubygem的版本是:

2.0.14.1 

,而我的OpenSSL的版本是:

OpenSSL 0.9.8zh 14 Jan 2016 

所以我试着研究这个错误,并且那么它导致我到这link,有很多关于安装RVM,但我不能因卷曲(60)错误 - 所以我查了另一个可能的原因,描述了我应该升级我的openssl的诊断。所以......

  1. 我试图安装自制软件,以便它让我更新OpenSSL,创建的.bash_profile这个PATH="/usr/local/bin:$PATH"

  2. 执行该终端/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

然后发生另一个错误:

curl: (60) SSL certificate problem: Invalid certificate chain 
More details here: https://curl.haxx.se/docs/sslcerts.html 

curl performs SSL certificate verification by default, using a "bundle" 
of Certificate Authority (CA) public keys (CA certs). If the default 
bundle file isn't adequate, you can specify an alternate file 
using the --cacert option. 
If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use 
the -k (or --insecure) option. 

我已经检查过我的证书,并且没有过期的证书。

如果还有其他任何细节需要了解以帮助我,请告诉我。我真的很绝望......我只想继续学习SASS。 T_T

+0

另请参见[Homebrew拒绝链接OpenSSL](http://*.com/q/38670295),[在OS X上用Homebrew更新OpenSSL](http://*.com/q/15185661),[如何安装最新版本的OpenSSL Mac OS X El Capitan](http://*.com/q/35129977),[如何在OS X中升级OpenSSL?](http://apple.stackexchange.com/q/ 126830),[使用HomeBrew的Openssl安装失败](http://superuser.com/q/486389)等。 – jww

+0

@jww我已经尝试了所有这些链接。但主要问题是安装自制软件.. – astropringles

+0

你可以尝试更新'cacert.pem'。请参阅cURL的[从Mozilla提取的CA证书](https://curl.haxx.se/docs/caextract.html)。您也可以尝试其中一种[备选安装](https://github.com/Homebrew/brew/blob/master/docs/Installation.md#installation)。 'mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew'看起来很不错。您还可以通过'curl'来忽略由于旧的'cacerts.pem'导致的证书错误。 – jww

以防万一有人有这个问题..这是由于代理。只需使用http。谢谢。