Created
September 22, 2011 06:49
-
-
Save shyam/1234201 to your computer and use it in GitHub Desktop.
Installing Ruby 1.9.x from source on Linux ( Debian/Ubuntu and RHEL/CentOS )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: This script show how to compile ruby-1.9.2-p290. It can also be used for 1.9.3-p0 or higher versions. | |
# | |
# Dependencies | |
# | |
# Debian and derivatives: | |
# aptitude install build-essential libssl-dev libcurl4-openssl-dev libreadline5-dev zlib1g-dev libxslt1-dev libxml2-dev | |
# RHEL and derivatives: | |
# yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel | |
## NOTE: For centos >= 5.4 iconv-devel is provided by glibc | |
cd /usr/src | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.bz2 | |
tar xjf ruby-1.9.2-p290.tar.bz2 | |
cd ruby-1.9.2-p290 | |
./configure --enable-shared | |
make install | |
cd ext/openssl/ | |
ruby extconf.rb | |
make install | |
cd ../readline/ | |
ruby extconf.rb | |
make install | |
gem update --system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment