17

我正在安装一个相对干净的 OS X。我有 Xcode,但删除了它。

当我输入rvm install 1.9.3时,我得到:

max-macbook:~ max$ rvm install 1.9.3 Fetching yaml-0.1.4.tar.gz to /Users/max/.rvm/archives   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed   0     0    0     0    0     0      0      0 --:--:-- --:--:--
--:--:--     0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://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. There was an error, please check /Users/max/.rvm/log//*.log. Next we'll try to fetch via http. Trying ftp:// URL instead.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed   0     0    0     0    0     0      0      0 --:--:-- --:--:--
--:--:--     0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://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. There was an error, please check /Users/max/.rvm/log//*.log Extracting yaml-0.1.4.tar.gz to /Users/max/.rvm/src Error running 'tar xmzf /Users/max/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/max/.rvm/src ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/extract.log /Users/max/.rvm/scripts/functions/pkg: line 52: cd: /Users/max/.rvm/src/yaml-0.1.4: No such file or directory Configuring yaml in /Users/max/.rvm/src/yaml-0.1.4. Error running ' ./configure
--prefix="/Users/max/.rvm/usr"  ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/configure.log Compiling yaml in /Users/max/.rvm/src/yaml-0.1.4. Error running 'make ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/make.log


Database file /Users/max/.rvm/config/packages does not exist.

/Users/max/.rvm/scripts/functions/build: line 28: --version: command not found Installing Ruby from source to: /Users/max/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching  ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while depending on your connection...

奇怪的事情似乎正在发生,就像我没有默认系统一样。这是我第一次尝试安装 Ruby(最终尝试使用 Rails),所以整个过程对我来说很陌生。

我检查了输出提到的几个日志,大多数时候 RVM 正在寻找一个不存在的文件(但它说它已下载)或一个不存在的程序(它试图运行./configure并得到一个“文件未找到”)。

任何人都可以对此有所了解吗?我想尽快弄脏 Rails。

4

5 回答 5

29

旧的 RVM 证书已过期,我们正在迁移到较短的域rvm.io,我已更新所有资源和代码以指向新域,只需更新 RVM:

rvm get head # OR:
rvm get stable

还有新的更短的安装程序命令:

curl -L get.rvm.io | bash -s stable

对于较旧的 RVM 版本,可能需要:

rvm get head
rvm reload
rvm get stable
于 2012-04-08T20:33:16.430 回答
18

我们解决了这个问题:

echo 'insecure' > ~/.curlrc
于 2012-10-13T13:15:41.917 回答
1

我在 Ubuntu 上安装 1.9.3 时遇到了同样的错误。rvm 站点的 SSL 证书已过期;错误来自尝试获取yaml-0.1.4.tar.gz

看起来它在几次重试后确实正确地故障转移到常规 HTTP 或 FTP,所以不应该担心任何事情(尽管红色文本看起来确实不祥)。

如果您真的想抑制错误消息,请在以下位置查找这两行(对我来说,第 62 和 66 行)~/.rvm/scripts/fetch

fetch_command="curl -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent

fetch_command="curl -f -L --create-dirs -C - " # -s for silent

并在 curl 中添加 -k 标志,以便它不验证 SSL 证书:

fetch_command="curl -k -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent

fetch_command="curl -k -f -L --create-dirs -C - " # -s for silent
于 2012-04-07T03:26:50.093 回答
1

这是使用 RVM 安装 Ruby 1.9.2 时出现 Curl 证书错误的副本

Wei 描述的解决方案在我的 Debian 机器上运行良好:

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
cp yaml-0.1.4.tar.gz /home/luc/.rvm/archives
rvm install 1.9.3 
于 2012-04-07T11:50:04.197 回答
1

截至 2013 年 11 月 2 日,@mpapis 的回答对我不起作用。最终,rvm 失败消息将我指向 rvm.io/support/fixing-broken-ssl-certificates,它说要sudo apt-get install ca-certificates为 Ubuntu 运行。然后标准/curl -L get.rvm.io | bash -s stable起作用了。

于 2013-11-02T20:38:04.570 回答