CentOSにRVMでRuby1.9.2を入れようとしたらエラーになった

Ruby1.9.2がリリースされたので早速入れてみようと思いCentOSのRVMでインストールしてみるとエラーが。

$ rvm install ruby-1.9.2-head

info: Installing Ruby from source to: /home/arcright/.rvm/rubies/ruby-1.9.2-head

info: Downloading source from http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2.

info: Copying from repo to src path...

info: Running autoconf

error: Error running 'autoconf', please check /home/arcright/.rvm/log/ruby-1.9.2-head/autoconf*.log

error: Skipping configure step, 'configure' does not exist, did autoconf not run successfully?

info: Compiling ruby-1.9.2-head, this may take a while depending on your cpu(s)...

error: Error running 'make ', please check /home/arcright/.rvm/log/ruby-1.9.2-head/make*.log

error: There has been an error while running make. Aborting the installation.

~/.rvm/log/ruby-1.9.2-head/autoconf.error.logを見てみると下記エラーが。

autoconf
configure.in:6: error: Autoconf version 2.60 or higher is required
configure.in:6: the top level
autom4te: /usr/bin/m4 failed with exit status: 63

CentOSのautoconfのバージョンをみてみると2.59なので古いようですね

$ /usr/bin/autoconf --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

RVMのDocumentに解決策は書いてあってRVMからautoconfをいれればいいよう(RVM上で外部パッケージを管理できるぽい)

$ rvm package install autoconf

$ ~/.rvm/bin/bin/autoconf --version
autoconf (GNU Autoconf) 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

# export PATH=$HOME/.rvm/bin:$PATHってurlにはあったんだけど自分の環境だと~/.rvm/bin/binに入ってた
$ export PATH=$HOME/.rvm/bin/bin:$PATH

$ rvm install ruby-1.9.2-head

$ rvm use ruby-1.9.2-head

$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29034) [i686-linux]

無事入った