###前提・実現したいこと
Mac上でvagrantを使ってCentOS6.7を立ち上げています。
その中で、rbenvを使ってruby1.9.3をインストールしたいのですが、エラーになってしまいました。
###発生している問題・エラーメッセージ
bash
1$ rbenv install 1.9.3-p194 2Downloading yaml-0.1.6.tar.gz... 3-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749 4Installing yaml-0.1.6... 5Installed yaml-0.1.6 to /home/vagrant/.rbenv/versions/1.9.3-p194 6 7Downloading ruby-1.9.3-p194.tar.bz2... 8-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2 9error: failed to download ruby-1.9.3-p194.tar.bz2 10 11BUILD FAILED (CentOS release 6.7 (Final) using ruby-build 20160130-6-g9e57fb0) 12 13Inspect or clean up the working tree at /tmp/ruby-build.20160214075629.21100 14Results logged to /tmp/ruby-build.20160214075629.21100.log 15 16Last 10 log lines: 17curl performs SSL certificate verification by default, using a "bundle" 18 of Certificate Authority (CA) public keys (CA certs). If the default 19 bundle file isn't adequate, you can specify an alternate file 20 using the --cacert option. 21If this HTTPS server uses a certificate signed by a CA represented in 22 the bundle, the certificate verification probably failed due to a 23 problem with the certificate (it might be expired, or the name might 24 not match the domain name in the URL). 25If you'd like to turn off curl's verification of the certificate, use 26 the -k (or --insecure) option.
###解決のために実行した内容
以下のコマンドを試しましたが、解決に至っていません。
bash
1sudo yum -y install openssl-devel
bash
1rbenv rehash
bash
1yum clean all
bash
1rbenv install 1.9.3-p194 -k
bash
1rbenv install 1.9.3-p125
###補足情報(言語/FW/ツール等のバージョンなど)
- rbenv 1.0.0-16-gd6ab394
CentOS. rubyについてこれから勉強しようと思っている初学者のため、可能でしたら解決策をご説明していただけると大変助かります。
###参考にさせていただいたリンク
Ruby 2.2.0をrbenvとruby-buildでインストール
サーバのSSL CA(認証局)証明書が古くてcurl がエラーになる件
yum clean コマンドでキャッシュ削除・アップデートのチェックと実行 〜 CentOS6
###質問投降後、試したこと
なぜかCentOS上の時間が過去になっていたので、修正しました。
vagrantfile内に
config.vm.provider :virtualbox do |vb| vb.customize ["setextradata", :id, "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled", 0] end
を記述しました。
参考)vagrantで時刻がおかしい場合の対処法
その後、別のエラーメッセージが表示されました。
bash
1$ rbenv install 1.9.3-p194 2Downloading yaml-0.1.6.tar.gz... 3-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749 4Installing yaml-0.1.6... 5Installed yaml-0.1.6 to /home/vagrant/.rbenv/versions/1.9.3-p194 6 7Downloading ruby-1.9.3-p194.tar.bz2... 8-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2 9Installing ruby-1.9.3-p194... 10 11BUILD FAILED (CentOS release 6.7 (Final) using ruby-build 20160130-6-g9e57fb0) 12 13Inspect or clean up the working tree at /tmp/ruby-build.20160226194420.31997 14Results logged to /tmp/ruby-build.20160226194420.31997.log 15 16Last 10 log lines: 17ossl_pkey_ec.c:761: 警告: implicit declaration of function ‘EC_GF2m_simple_method’ 18ossl_pkey_ec.c:761: 警告: assignment makes pointer from integer without a cast 19ossl_pkey_ec.c:816: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function) 20ossl_pkey_ec.c:816: error: (Each undeclared identifier is reported only once 21ossl_pkey_ec.c:816: error: for each function it appears in.) 22make[2]: *** [ossl_pkey_ec.o] エラー 1 23make[2]: ディレクトリ `/tmp/ruby-build.20160226194420.31997/ruby-1.9.3-p194/ext/openssl' から出ます 24make[1]: *** [ext/openssl/all] エラー 2 25make[1]: ディレクトリ `/tmp/ruby-build.20160226194420.31997/ruby-1.9.3-p194' から出ます 26make: *** [build-ext] エラー 2
rbenv を利用した ruby のインストール中にエラーとなる場合の対応を参考に、
bash
1curl -fsSL "https://github.com/ruby/ruby/commit/0d58bb55985e787364b0235e5e69278d0f0ad4b0.patch"
を実行後再びインストールをしようとしたところ、
bash
1Downloading yaml-0.1.6.tar.gz... 2-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749 3Installing yaml-0.1.6... 4Installed yaml-0.1.6 to /home/vagrant/.rbenv/versions/1.9.3-p194 5 6Downloading ruby-1.9.3-p194.tar.bz2... 7-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2 8Installing ruby-1.9.3-p194...
この状態で止まってしまっています。
このまま待ち続けたほうが良いのか、それとも別の解決法があるのか、ご存知の方がいらっしゃったら教えていただけると幸いです。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/02/26 08:53 編集
2016/02/28 04:17