Ruby install on RHEL 5.5 Linux 64
2011-05-13 17:06
351 查看
Link: https://github.com/imeyer/ruby-1.9.2-rpm
The following instructions assume installation on a 32-bit platform. For 64-bit replace i386 with x86_64 .
yum install -y rpm-build
cd /usr/src/redhat/SOURCES
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
cd /usr/src/redhat/SPECS
curl https://github.com/robduncan/ruby-1.9.2-rpm/raw/master/ruby19.spec > ruby19.spec
rpmbuild -bb ruby19.spec
rpm -Uvh ../RPMS/i386/ruby-1.9.2p180-1.ruby-1.9.2p180-1.i386.rpm
x86_64:
cd /usr/src/redhat/SOURCES
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
cd /usr/src/redhat/SPECS
rpmbuild -bb ruby19.spec
[root@svltest358 SPECS]# rpmbuild -bb ruby19.spec
error: Failed build dependencies:
readline-devel is needed by ruby-1.9.2p180-1.x86_64
ncurses-devel is needed by ruby-1.9.2p180-1.x86_64
gdbm-devel is needed by ruby-1.9.2p180-1.x86_64
glibc-devel is needed by ruby-1.9.2p180-1.x86_64
tcl-devel is needed by ruby-1.9.2p180-1.x86_64
gcc is needed by ruby-1.9.2p180-1.x86_64
openssl-devel is needed by ruby-1.9.2p180-1.x86_64
db4-devel is needed by ruby-1.9.2p180-1.x86_64
byacc is needed by ruby-1.9.2p180-1.x86_64
那么换老办法了,自己手动编译吧:
1.
[root@svltest358 ruby-1.9.2-p180]# ./configure -prefix=/usr/local/ruby
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/data/software/ruby-1.9.2-p180':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
安装gcc吧,解决问题:
yum -y install gcc
2.
make
make install
3.
export PATH=/usr/local/ruby-1.8.7-p330/bin:$PATH
把这个放到 ./.bash_profile里面比较好
4.
安装
[root@svltest358 ~]# gem install JSON
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
zlib的包没有安装好,重装安装ruby 源码中的zlib可以解决这个问题,
# yum install zlib zlib-devel
Then:
# cd /usr/local/src/ruby-1.9.2-p38/ext/zlib/
# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# make
# make install
其实json已经是ruby的扩展库了,不用单独安装的。 Good!
5.
The following instructions assume installation on a 32-bit platform. For 64-bit replace i386 with x86_64 .
yum install -y rpm-build
cd /usr/src/redhat/SOURCES
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
cd /usr/src/redhat/SPECS
curl https://github.com/robduncan/ruby-1.9.2-rpm/raw/master/ruby19.spec > ruby19.spec
rpmbuild -bb ruby19.spec
rpm -Uvh ../RPMS/i386/ruby-1.9.2p180-1.ruby-1.9.2p180-1.i386.rpm
x86_64:
cd /usr/src/redhat/SOURCES
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
cd /usr/src/redhat/SPECS
rpmbuild -bb ruby19.spec
[root@svltest358 SPECS]# rpmbuild -bb ruby19.spec
error: Failed build dependencies:
readline-devel is needed by ruby-1.9.2p180-1.x86_64
ncurses-devel is needed by ruby-1.9.2p180-1.x86_64
gdbm-devel is needed by ruby-1.9.2p180-1.x86_64
glibc-devel is needed by ruby-1.9.2p180-1.x86_64
tcl-devel is needed by ruby-1.9.2p180-1.x86_64
gcc is needed by ruby-1.9.2p180-1.x86_64
openssl-devel is needed by ruby-1.9.2p180-1.x86_64
db4-devel is needed by ruby-1.9.2p180-1.x86_64
byacc is needed by ruby-1.9.2p180-1.x86_64
那么换老办法了,自己手动编译吧:
1.
[root@svltest358 ruby-1.9.2-p180]# ./configure -prefix=/usr/local/ruby
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/data/software/ruby-1.9.2-p180':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
安装gcc吧,解决问题:
yum -y install gcc
2.
make
make install
3.
export PATH=/usr/local/ruby-1.8.7-p330/bin:$PATH
把这个放到 ./.bash_profile里面比较好
4.
安装
[root@svltest358 ~]# gem install JSON
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
zlib的包没有安装好,重装安装ruby 源码中的zlib可以解决这个问题,
# yum install zlib zlib-devel
Then:
# cd /usr/local/src/ruby-1.9.2-p38/ext/zlib/
# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# make
# make install
其实json已经是ruby的扩展库了,不用单独安装的。 Good!
5.
相关文章推荐
- How to Install and Configure a VNC Server on RedHat Enterprise Linux (RHEL) 6
- Install Rouge and Pyrouge for python 2.7 (conda virtual env) on Linux 64
- How to Install Ruby 2.1.1 on CentOS & RHEL 6 using RVM
- install erlang on linux (centos5.5)
- How to install 64-bit Google Chrome 28+ on 64-bit RHEL/CentOS 6 or 7
- How to install JDK on Linux (RHEL5.*)
- Using IBMIM on RHEL62 x86_64 (Install 32-bit X libs)
- How to Install WineHQ 1.5.27 on Fedora, CentOS and RHEL Linux Distributions
- Step by step Install Oracle 11gR2(11.2.0.4.0) RAC+Active DataGuard on Oracle Enterprise Linux(OEL6.3X86_64)
- Install EPEL Repository On RHEL / CentOS / Scientific linux 6.x, 5.x
- Install 11.2.0.3(RAC) Grid Infrastructure on linux x86-64, run root.sh on second node failed 失败一列
- How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed
- ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)
- install skype on 64 bit linux system
- How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
- How to Install Oracle Java on Ubuntu Linux
- Ruby on Rails Session 2: How to install Aptana Studio 3 on Ubuntu 12.04 LTS
- sybase-ase1252_de_linux install on as4u5 推荐
- how-to-install-grafana-on-centos6.6-x86_64
- Linux系统平台上安装和配置Ruby on Rails