2017-06-14 100 views
0

我只是真的需要安裝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://stackoverflow.com/q/38670295),[在OS X上用Homebrew更新OpenSSL](http://stackoverflow.com/q/15185661),[如何安裝最新版本的OpenSSL Mac OS X El Capitan](http://stackoverflow.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

回答

0

以防萬一有人有這個問題..這是由於代理。只需使用http。謝謝。