Wil*_*nis 90 curl ruby-on-rails rvm
尝试下载Ruby 1.9.2时,RVM遇到证书错误.看起来好像curl
有证书问题,但我不知道如何绕过它.我在下面列出了确切的错误信息.
$ rvm install 1.9.2
Installing Ruby from source to: /Users/willdennis/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...
ruby-1.9.2-p180 - #fetching
ERROR: Error running 'bunzip2 '/Users/willdennis/.rvm/archives/ruby-1.9.2-p180.tar.bz2'', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/extract.log
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
Fetching yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/archives
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). The default
bundle is named curl-ca-bundle.crt; 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.
ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
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). The default
bundle is named curl-ca-bundle.crt; 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.
ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log
Extracting yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/src
ERROR: Error running 'tar zxf /Users/willdennis/.rvm/archives/yaml-0.1.3.tar.gz -C /Users/willdennis/.rvm/src --no-same-owner', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/extract.log
/Users/willdennis/.rvm/scripts/functions/packages: line 55: cd: /Users/willdennis/.rvm/src/yaml-0.1.3: No such file or directory
Configuring yaml in /Users/willdennis/.rvm/src/yaml-0.1.3.
ERROR: Error running ' ./configure --prefix="/Users/willdennis/.rvm/usr" ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/configure.log
Compiling yaml in /Users/willdennis/.rvm/src/yaml-0.1.3.
ERROR: Error running '/usr/bin/make ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.log
Installing yaml to /Users/willdennis/.rvm/usr
ERROR: Error running '/usr/bin/make install', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.install.log
ruby-1.9.2-p180 - #configuring
ERROR: Error running ' ./configure --prefix=/Users/willdennis/.rvm/rubies/ruby-1.9.2-p180 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/willdennis/.rvm/usr ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/configure.log
ERROR: There has been an error while running configure. Halting the installation.
Run Code Online (Sandbox Code Playgroud)
如何解决或避免此错误?
jwa*_*ack 125
如果在尝试更新到1.9.3时有任何其他人遇到此问题(尽管版本可能无关紧要),请检查您拥有的rvm版本.Wayne似乎从rvm.beginrescueend.com搬到了rvm.io. 旧网站的安全证书已过期,因此curl的响应是正确的.
从新站点更新rvm修复了这个问题并允许我继续前进.
$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled
Run Code Online (Sandbox Code Playgroud)
更新:正如@rodgerdpack所提到的,命令发生了变化,我已经更新了上面的内容.一般情况下,请参阅https://rvm.io/了解最新信息.
Dan*_*nie 40
如果不想更改脚本并且您不想将"永远"证书添加到证书包中.有一个非常好的和快速的解决方案:
#to download the cert
wget http://curl.haxx.se/ca/cacert.pem
#to let curl use it for the next calls
export CURL_CA_BUNDLE=~/cacert.pem
Run Code Online (Sandbox Code Playgroud)
然后运行你的脚本.要重置环境变量(对于不应使用此证书的后续脚本调用),请重新登录系统或取消设置环境变量:
export CURL_CA_BUNDLE=
Run Code Online (Sandbox Code Playgroud)
小智 21
Curl在.rvm/scripts/fetch中调用,默认情况下将在您的主目录中.
使用您喜欢的文本编辑器编辑它:例如,
nano ~/.rvm/scripts/fetch
Run Code Online (Sandbox Code Playgroud)
在第56和58行(当然可能与其他版本的RVM不同),你会看到两行开始
fetch_command="curl ...
Run Code Online (Sandbox Code Playgroud)
只需在卷曲后添加-k,保存并重试.
dbi*_*ard 20
您需要从http://curl.haxx.se/ca/cacert.pem下载ca证书并将其添加到curl-ca-bundle-new.crt文件中.
要查找此文件的位置,请使用:
$ curl-config --ca
/usr/share/curl/curl-ca-bundle.crt
Run Code Online (Sandbox Code Playgroud)
备份curl-ca-bundle.crt文件:
$ cp /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/curl-ca-bundle.crt.old
Run Code Online (Sandbox Code Playgroud)
然后你想使用以下方法连接这两个文件:
$ cat cacert.pem /usr/share/curl/curl-ca-bundle.crt >> curl-ca-bundle-new.crt
Run Code Online (Sandbox Code Playgroud)
Nic*_*ick 17
也许所有这些复杂的解决方案曾经是必要的,但现在您需要做的就是首先升级RVM,您的问题将得到解决:
$ rvm get stable
$ rvm reload
$ rvm install ruby-1.9.3-p194
Run Code Online (Sandbox Code Playgroud)
Voj*_*jto 14
如果你不介意在curl中禁用证书检查(我没有):
echo insecure > ~/.curlrc
Run Code Online (Sandbox Code Playgroud)
Ser*_*kyy 11
在Centos 5.6(最终版)上我遇到了安装rvm 1.9.2的问题.错误是:
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). The default
bundle is named curl-ca-bundle.crt; 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.
ERROR: There was an error, please check /usr/local/rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
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). The default
bundle is named curl-ca-bundle.crt; 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.
ERROR: There was an error, please check /usr/local/rvm/log/ruby-1.9.2-p290/*.log
ERROR: There has been an error while trying to fetch the source.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
Run Code Online (Sandbox Code Playgroud)
以下是帮助我解决问题的操作列表
$ curl-config --ca # show path to the certificate
/usr/local/share/curl/curl-ca-bundle.crt
$ cd /usr/local/share/curl/ # go to that path
$ cp curl-ca-bundle.crt curl-ca-bundle.crt.bak # backup certificate
$ curl http://curl.haxx.se/ca/cacert.pem -o curl-ca-bundle.crt # download new
$ rvm install 1.9.2 # bingo it works
Run Code Online (Sandbox Code Playgroud)
Btw curl版本是卷曲7.18.0(检查'$ curl -V')
我在使用 RVM 安装 1.9.2 时遇到问题,这是我的解决方案:
运行这些命令:
chmod 777 yaml-0.1.3.tar.gz
tar zxf /Users//.rvm/archives/yaml-0.1.3.tar.gz -C /Users//.rvm/src
我仍然遇到文件未找到错误,但安装继续成功
[2011-07-05 14:24:07] tar zxf /Users//.rvm/archives/yaml-0.1.3.tar.gz -C /Users//.rvm/src --no-same-owner tar (子):/Users//.rvm/archives/yaml-0.1.3.tar.gz:无法打开:没有这样的文件或目录 tar (子):错误不可恢复:现在退出 tar:子返回状态 2 tar :错误退出因之前的错误而延迟
归档时间: |
|
查看次数: |
34582 次 |
最近记录: |