1
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VirtualBox、Vagrantを使って、rbenvをinstallしたときにエラーに遭遇

1
Last updated at Posted at 2017-06-04

概要

VirtualBox、Vagrantを使って、rbenvをinstallしたときにエラーに遭遇したので、それの解決した時のメモ

環境

  • macOS Sierra 10.12.5
  • Rails5
  • Virtual Box
  • Vagrant
  • CentOS7

エラー内容

仮想マシン上で必要なソフトウェアをインストールしていた時に、rbenvがインストールできなかった。

$ rbenv install 2.4.0
Downloading ruby-2.4.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
error: failed to download ruby-2.4.0.tar.bz2

BUILD FAILED (CentOS Linux 7 using ruby-build 20170523-7-g2de7a29)

エラーログを確認してみるとcurlがどうやらおかしいらしい。

less /tmp/ruby-build.2017*******.****.log
curl: (35) Peer reports incompatible or unsupported protocol version.

解決方法

rbenvでrubyのインストールが出来ない:CentOS7を参考にして下記のコマンドを実行してみる。

$ RUBY_BUILD_CURL_OPTS=--tlsv1.2 rbenv install 2.4.0
Downloading ruby-2.4.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
Installing ruby-2.4.0...
Installed ruby-2.4.0 to /home/vagrant/.rbenv/versions/2.4.0

よし、インストール完了!!!次に進みましょ!

参考資料

2017年版!30分で作るRuby on Rails 5開発環境 Mac編 Vagrant+CentOS7+rbenv
rbenvでrubyのインストールが出来ない:CentOS7

キーワード

  • Ruby On Rails5
  • Virtual Box
  • Vagrant
  • CentOS7
  • rbenv
1
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?