CentOS 6下安装ruby 1.9

安装libyaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install

 如果不安装libyaml,运行gem会出现:“It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby”警告。

 

安装ruby
tar -zxf ruby-1.9.3-p448.tar.gz
cd ruby-1.9.3-p448

./configure --enable-shared --disable-install-doc
make
make install

   可以从下面两个地址下载ruby1.9:

参考文章:

Install Ruby 1.9.3 with libyaml on CentOS(转)

Install Ruby 1.9 in CentOS 6

 

--end

 

 

你可能感兴趣的:(centos)