Linux

LinuxにRubyをインストール

事前準備
[root]# yum install -y zlib
[root]# yum install -y zlib-devel

ダウンロード
[root]# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p330.tar.gz

インストール
[root]# tar -zxvf ruby-1.8.7-p330.tar.gz
[root]# cd ruby-1.8.7-p330
[root]# ./configure --prefix=/usr
[root]# make
[root]# checkinstall --fstrans=no
Should I create a default set of  package docs?  [y]: y

Slackware [S], RPM [R] or Debian [D]? R

End your description with an empty line or EOF.

>>Enter

Enter a number to change any of them or press ENTER to continue: Enter

Do you want me to list them?  [n]: n

Should I exclude them from the package?  (Saying yes is a good idea)  [y]: y

[root]# rpm -ivh /usr/src/redhat/RPMS/i386/ruby-1.8.7-p330-1.i386.rpm
[root]# cd ext/zlib
[root]# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
[root]# make
[root]# make install

参考サイト:
http://www.genteel.org/?p=141
http://www.kotatsuneko.net/linux/Ruby_install.html

投稿日:

-Linux

Copyright© とうふもなか ブログ , 2020 All Rights Reserved Powered by STINGER.