【发布时间】:2017-11-16 09:27:06
【问题描述】:
我真的需要安装 Sass。但是后来却导致了这个错误:
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 版本是:
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 但由于 curl(60) 错误我不能 - 所以我检查了另一个可能的原因,它描述了我应该升级我的openssl的诊断。所以……
我尝试安装 homebrew 以便它可以让我更新 openssl,并使用此
PATH="/usr/local/bin:$PATH"创建了一个 .bash_profile执行到终端
/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
【问题讨论】:
-
@jww 我已经尝试了所有这些链接。但主要问题是安装 Homebrew..
-
您可以尝试更新的
cacert.pem。请参阅 cURL 的 CA certificates extracted from Mozilla。您也可以尝试其中一个Alternative Installs。mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew看起来是个不错的选择。您还可以告诉curl忽略由于旧的cacerts.pem而导致的证书错误。 -
@jww 我尝试了替代安装 mkdir... 它说 'mkdir:homebrew: FIle exists' 但是当我尝试 brew install... 它没有找到命令
-
您应该将此问题移至Apple Stack Exchange 或Unix & Linux Stack Exchange 之类的网站。您似乎在使用基本命令时遇到问题,例如
mkdir和rm;以及如何使用curl。这里没有任何与编程或开发相关的内容。
标签: ruby macos sass openssl homebrew