linux下安装 ruby-zlib 的关键一步
2013-11-27 09:22
549 查看
在 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
完结!
不怕不怕,下载并安装了 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
完结!
相关文章推荐
- yum本地配置
- linux修改localhost方法
- arm linux嵌入式经典回答
- 每天一个linux命令(61):wget命令
- linux静态库和共享库
- 每天一个linux命令(59):rcp命令
- 每天一个linux命令(60):scp命令
- 【博文汇总】linux下多任务编程
- 每天一个linux命令(58):telnet命令
- Linux下多任务间通信和同步-互斥锁
- linux下的静态库与动态库的区别
- linux之sed用法
- linux 新建用户、用户组 以及为新用户分配权限
- Linux的学习计划
- linux内存寻址---物理地址、线性地址、虚拟地址。逻辑地址(二)
- linux内存寻址---虚拟地址、逻辑地址、线性地址、物理地址(一)
- linux环境下安装pyramid和新建项目的步骤
- Linux环境变量
- Linux mint 14输入法问题
- gdb调试多进程程序