[ruby-on-rails] RVM을 사용하여 Ruby 1.9.2를 설치할 때 Curl 인증서 오류

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.

이 오류를 해결하거나 방지하려면 어떻게해야합니까?



답변

1.9.3으로 업데이트를 시도하는 동안 다른 사람이이 문제를 발견하는 경우 (버전은 중요하지 않지만) 보유하고있는 rvm의 버전을 확인하십시오. Wayne은 rvm.beginrescueend.com에서 rvm.io로 이동 한 것 같습니다. 이전 사이트의 보안 인증서가 만료되었으므로 curl의 응답이 정확합니다.

새 사이트에서 rvm을 업데이트하면이 문제가 해결되어 앞으로 나아갈 수있었습니다.

$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled

업데이트 : @rodgerdpack이 언급했듯이 명령이 변경되고 위의 내용을 업데이트했습니다. 일반적으로 최신 정보는 https://rvm.io/ 를 참조 하십시오 .


답변

경우 스크립트를 변경하지 그리고 당신은 않습니다 “지금은”인증서를 추가하지 CERT는 번들로. 매우 훌륭하고 빠른 솔루션이 있습니다.

#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

그런 다음 스크립트를 실행하십시오. 환경 변수를 재설정하려면 (이 인증서를 사용하지 않아야하는 후속 스크립트 호출의 경우) 시스템에 다시 로그인하거나 환경 변수를 설정 해제하십시오.

export CURL_CA_BUNDLE=


답변

Curl은 .rvm / scripts / fetch에서 호출되며 기본적으로 홈 디렉토리에 있습니다.

좋아하는 텍스트 편집기를 사용하여 편집하십시오. 예 :

 nano ~/.rvm/scripts/fetch

56 행과 58 행 (물론 다른 버전의 RVM에 따라 다를 수 있음)에서 시작하는 두 행을 볼 수 있습니다.

 fetch_command="curl ...

curl 후에 -k를 추가하고 저장하고 다시 시도하십시오.


답변

http://curl.haxx.se/ca/cacert.pem 에서 ca 인증서를 다운로드 하여 curl-ca-bundle-new.crt 파일에 추가해야합니다.

이 파일의 위치를 ​​찾으려면 다음을 사용하십시오.

   $ curl-config --ca

   /usr/share/curl/curl-ca-bundle.crt

curl-ca-bundle.crt 파일을 백업합니다.

$ cp /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/curl-ca-bundle.crt.old

그런 다음 다음을 사용하여 두 파일을 연결하려고합니다.

$ cat cacert.pem /usr/share/curl/curl-ca-bundle.crt >> curl-ca-bundle-new.crt


답변

아마도 이러한 모든 복잡한 솔루션이 한때 필요했지만 이제는 먼저 RVM을 업그레이드하기 만하면 문제가 해결됩니다.

$ rvm get stable
$ rvm reload
$ rvm install ruby-1.9.3-p194


답변

컬에서 인증서 확인을 비활성화해도 괜찮다면 다음을 수행하십시오.

echo insecure > ~/.curlrc


답변

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.

문제 해결에 도움이 된 조치 목록은 다음과 같습니다.

$ 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

Btw curl 버전은 curl 7.18.0입니다 ( ‘$ curl -V’확인)