首页 > 代码库 > Ruby源码编译安装(ruby-2.1.4.tar.gz)

Ruby源码编译安装(ruby-2.1.4.tar.gz)


Ruby下载地址:

http://www.ruby-lang.org/en/downloads/

ruby-1.9.3-p550.tar.gz

ruby-2.0.0-p594.tar.gz


[root@rhel64 ~]# yum -y install gcc make gcc-c++

[root@rhel64 ~]# wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz

[root@rhel64 ~]#tar -xzvf ruby-2.1.4.tar.gz 

[root@rhel64 ~]# cd ruby-2.1.4

[root@rhel64 ruby-2.1.4]# ./configure --enable-pthread --prefix=/usr/local/ruby

[root@rhel64 ruby-2.1.4]# make && make install

[root@rhel64 ruby-2.1.4]# cat << EOF >> /etc/profile

export PATH=/usr/local/ruby/bin:$PATH

EOF

[root@rhel64 ruby-2.1.4]# source /etc/profile

[root@rhel64 ruby-2.1.4]# ruby -v

ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]

[root@rhel64 ruby-2.1.4]#


本文出自 “Jerry” 博客,请务必保留此出处http://alipay.blog.51cto.com/7119970/1576371

Ruby源码编译安装(ruby-2.1.4.tar.gz)