11
9

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.

CentOS6.5 + rbenvでrubyを2.2.0にUpdateする際のメモ

Posted at

local上でRubyのVersionをあげて、
そろそろサーバーも上げていくかーっと行った際のツボった場所とメモ

  • いつもどおりrbenvとruby-buildのUpdate
$ cd "$(rbenv root)"/ && git pull
$ cd "$(rbenv root)"/plugins/ruby-build && git pull
  • rbenv より2.2.0のRubyをインストール

$ rbenv install 2.2.0

 Downloading ruby-2.2.0.tar.gz...
 ->  http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
 Installing ruby-2.2.0...
 
 BUILD FAILED (RedHatEnterpriseServer 6.5 using ruby-build 20130628-472-g7f3cc01)

 Inspect or clean up the working tree at /tmp/ruby-build.20150312191821.1322
 Results logged to /tmp/ruby-build.20150312191821.1322.log

 Last 10 log lines:
 compiling ossl_pkey.c
 compiling ossl_engine.c
 compiling ossl_bio.c
 compiling ossl_x509crl.c
 compiling ossl_ssl_session.c
 installing default openssl libraries
 linking shared-object openssl.so
 make[2]: ディレクトリ `/tmp/ruby-build.20150312191821.1322/ruby-2.2.0/ext/openssl' から出ます
 make[1]: ディレクトリ `/tmp/ruby-build.20150312191821.1322/ruby-2.2.0' から出ます
 make: *** [build-ext] エラー 2

$ yum install libffi-devel

or enabled --enable-shared option


$ RUBY_CONFIGURE_OPTS=--enable-shared rbenv install 2.2.0

それでも治らないようだったら前提のモジュール群が古いあるいは入っていない可能性があるため
上のリンクにあるCentOS/Fedora:をやってみると治るかもしれない。

$ yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
11
9
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
11
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?