在 Ubutun 9.0.4上通过源代码方式安装完 ruby 1.9.1 时挺顺利的,所以兴高采烈地继续下一步,就是通过 ruby 1.9.1 已内置的 rubygems 1.3.1 来安装 rails 了,但是不料出现了错误,要求安装 zlib。
不怕不怕,下载并安装了 zlib 1.2.3,呵呵 ,还是挺顺利的,接下来应该可以了吧?
呀呀的 ,同样的错误出现了,好Google 下,发现还要装 ruby-zlib ,那只好照做了,如下:
<!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } A:link { so-language: zxx } -->
$wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0.6.0.tar.gz
$tar -xvzf ruby-zlib-0.6.0.tar.gz
$cd ruby-zlib-0.6.0/
$ ruby extconf.rb
checking for deflateReset() in -lz... no
checking for deflateReset() in -llibz... no
checking for deflateReset() in -lzlib... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/ruby/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-zlib
--without-zlib
--with-libzlib
--without-libzlib
--with-zliblib
--without-zliblib
呀呀的,Google 去(习惯性思维了),被整蒙了,最后静下心来看了看上面的错误信息,呵呵,挺详细的嘛!
于是
$ruby extconf.rb --with-zlib-dir =/usr/local/zlib
看到 creating Makefile 了,所以就放心地接着干吧!
抓狂了,出现一大堆的找不到指针的错误,只好在习惯性思维了一下,来到了 www.ruby-lang.org.cn,还好,有人推荐到
cd 放RUBY的SRC的目录/ext/zlib
$ruby extconf.rb --with-zlib-dir =/usr/local/zlib
<!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } -->
$ sudo make
$ sudo make install
完结!