さくらVPSにRuby2.2.1をインストールしました
こんにちは!くまかけです。
rbenv+ruby-build環境を利用してRuby2.2.1をインストールしました。
rbenv+ruby-build環境の構築はこちらを参考ください。
■Rubyのバージョンを確認します。
# rbenv install -l
:
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.2.0-dev
2.2.0-preview1
2.2.0-preview2
2.2.0-rc1
2.2.0
2.2.1
2.3.0-dev
:
■Rubyをインストールします。
# rbenv install 2.2.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Downloading ruby-2.2.1.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/5a4de38068eca8919cb087d338c0c2e3d72c9382c804fb27ab746e6c7819ab28 Installing ruby-2.2.1... BUILD FAILED (CentOS release 6.4 (Final) using ruby-build 20150303) Inspect or clean up the working tree at /tmp/ruby-build.20150316172323.20827 Results logged to /tmp/ruby-build.20150316172323.20827.log Last 10 log lines: ./libffi-3.2.1/.libs/libffi.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [../../.ext/x86_64-linux/fiddle.so] Error 1 make[2]: Leaving directory `/tmp/ruby-build.20150316172323.20827/ruby-2.2.1/ext/fiddle' make[1]: *** [ext/fiddle/all] Error 2 make[1]: *** Waiting for unfinished jobs.... installing default libraries make[2]: Leaving directory `/tmp/ruby-build.20150316172323.20827/ruby-2.2.1/ext/json' make[1]: Leaving directory `/tmp/ruby-build.20150316172323.20827/ruby-2.2.1' make: *** [build-ext] Error 2 |
libffi.aが無いって感じですね。。。
# yum install libffi-devel
1 2 3 4 5 6 7 8 9 |
========================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================== Installing: libffi-devel x86_64 3.0.5-3.2.el6 base 18 k Transaction Summary ========================================================================================================================================================== Install 1 Package(s) |
# rbenv install 2.2.1
# rbenv global 2.2.1
# ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]