linux下安装 ruby-zlib

上一篇 / 下一篇  2012-12-18 15:54:26 / 个人分类:ruby

需要安装zlib ,
1.编译安装zlib

2.进入源码包,/ext/zlib/,执行如下命令:似乎什么也没做

$ 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

3.红色字体的参数是一定要添加的

$ruby extconf.rb --with-zlib-dir =/usr/local/zlib

<!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } -->

$ sudo make
$ sudo make install


TAG:

 

评分:0

我来说两句

Open Toolbar