Ошибка скручивания сертификата при использовании RVM для установки Ruby 1.9.2 - программирование
Подтвердить что ты не робот

Ошибка скручивания сертификата при использовании RVM для установки Ruby 1.9.2

RVM запускается в ошибку сертификата при попытке загрузить Ruby 1.9.2. Похоже, что 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 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 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.

Как я могу разрешить или избежать этой ошибки?

4b9b3361

Ответ 1

Если кто-то еще сталкивается с этим при попытке обновить до 1.9.3 (хотя версия, вероятно, не имеет значения), проверьте версию rvm, которую у вас есть. Кажется, Уэйн перешел от rvm.beginrescueend.com к rvm.io. Срок действия старого сертификата безопасности сайта истек, поэтому корректный ответ.

Обновление rvm с нового сайта устраняет эту проблему и позволяет мне двигаться вперед.

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

Обновление. Как упоминалось в @rodgerdpack, команда изменяется, и я обновил выше. В общем, см. https://rvm.io/ для последнего.

Ответ 2

Если не хотите изменять script И вы не хотите добавлять сертификат "навсегда" в пакет сертификатов. Существует очень приятное и быстрое решение:

#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

Затем запустите script. В reset переменная среды (для последующих вызовов script, которые не должны использовать этот сертификат) повторно войдите в систему или отключите переменную окружения:

export CURL_CA_BUNDLE=

Ответ 3

Curl вызывается в .rvm/scripts/fetch, который по умолчанию будет находиться в вашем домашнем каталоге.

Измените это, используя ваш любимый текстовый редактор: например,

 nano ~/.rvm/scripts/fetch

В строках 56 и 58 (конечно, может отличаться в зависимости от других версий RVM) вы увидите две строки, которые начинаются

 fetch_command="curl ...

Просто добавьте -k после завивки, сохраните и повторите попытку.

Ответ 4

Вам необходимо загрузить сертификат ca из http://curl.haxx.se/ca/cacert.pem и добавить их в свой файл 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

Ответ 5

Возможно, все эти сложные решения были когда-то необходимы, но теперь все, что вам нужно сделать, это сначала обновить RVM, и ваша проблема будет решена:

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

Ответ 6

Если вы не против отключения проверки сертификата в curl (я этого не делаю):

echo insecure > ~/.curlrc

Ответ 7

On Centos 5.6 (Final) У меня возникла проблема с установкой 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 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 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')

Ответ 8

Я пытался установить ruby-1.9.2-p290 и столкнулся с той же проблемой. После запуска which curl и осознания того, что экземпляр curl исходил от установки MAMP в моей системе (OS X Snow Leopard), я переконфигурировал мою переменную PATH, чтобы использовать системный по умолчанию в /usr/bin/curl. Используя эту версию curl 7.19.7, у меня не возникло проблем с установкой последней версии Ruby с RVM.

Ответ 9

У меня возникли проблемы с установкой 1.9.2 с использованием RVM, вот мое решение:

  • Загрузите yaml-0.1.3.tar.gz из http://www.filewatcher.com/m/yaml-0.1.3.tar.gz.466845.0.0.html
  • Сохранить его в /Users//. rvm/archives/yaml-0.1.3.tar.gz
  • Запустите следующие команды:

    chmod 777 yaml-0.1.3.tar.gz

    tar zxf/Users//.rvm/archives/yaml-0.1.3.tar.gz -C/Пользователи//. 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 (child):/Users//.rvm/archives/yaml-0.1.3.tar.gz: Не удается открыть: нет такого файла или каталога tar (child): Ошибка не восстанавливается: выходить сейчас tar: Статус возврата ребенка 2 tar: Ошибка выхода из предыдущих ошибок

Ответ 10

Спасибо Дороти - этот рецепт работал у меня со следующими незначительными изменениями для среды Win7:

Для других с этой проблемой -

  • Оцените обсуждение обновления CA_Bundle - хорошо сделать но это не помогло в этом вопросе - сертификат веб-сайта pyyaml вызывают ошибку CURL, и поскольку CURL запускается внутри установщика, нет возможности добавить параметр -k.

  • Ruby 1.9.2-p290 пытается установить YAML 0.1.4, поэтому Google для зеркало и загрузить эту версию - YAML-0.1.3 не повлияет на в обход проблем.

  • Вам нужно сделать эквивалент Windows CHMOD 777 - в rvm/src папку для извлеченных файлов. Измените безопасность, чтобы каждый права собственности/всех и отключить атрибут "только для чтения" для всех файлов и папки.

Установщик по-прежнему будет вызывать ошибки при попытке загрузить (ошибка CURL), но будет возобновлен, пытаясь извлечь. Извлечение будет вызывать ошибки, потому что tarball уже извлечен в папку src. Следующий шаг настройки YAML должен работать без ошибок, если разрешения на шаге 3 были установлены правильно, и установка должна завершиться без дополнительных проблем. (Если вы устанавливаете с помощью cygwin/ bash, вам нужно будет добавить компилятор C, такой как "gcc", и добавить "ncurses" (команда tput) и "make" к настройкам настройки ядра cygwin по умолчанию.)

Ответ 11

$ sudo apt-get install curl

$ curl -L https://get.rvm.io | bash -s stable --ruby   with ruby

$ curl -L https://get.rvm.io | bash -s stable --rails   with rails