宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

在上一篇博文中,升级ruby版本中,提示如下错误:

1) Error fetching https://mirrors.aliyun.com/rubygems/:

1 [root@web ~]# gem sources -a https://mirrors.aliyun.com/rubygems/
2 Error fetching https://mirrors.aliyun.com/rubygems/:
3         SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed https://mirrors.aliyun.com/rubygems/specs.4.8.gz)

2)curl: 60) Peer certificate cannot be authenticated with known CA certificates

 1 [root@web ~]# curl -sSL https://get.rvm.io | bash -s stable
 2 curl: 60) Peer certificate cannot be authenticated with known CA certificates
 3 More details here: http://curl.haxx.se/docs/sslcerts.html
 4 
 5 curl performs SSL certificate verification by default, using a "bundle"
 6  of Certificate Authority CA) public keys CA certs). If the default
 7  bundle file isn't adequate, you can specify an alternate file
 8  using the --cacert option.
 9 If this HTTPS server uses a certificate signed by a CA represented in
10  the bundle, the certificate verification probably failed due to a
11  problem with the certificate it might be expired, or the name might
12  not match the domain name in the URL).
13 If you'd like to turn off curl's verification of the certificate, use
14  the -k or --insecure) option.

上述错误是主机时间不对。更改过主机时间后,可避免上述错误。