zlib error while installing gems on Linux

Discussion in 'Ruby' started by Joe Cheng, Jul 30, 2005.

  1. Joe Cheng

    Joe Cheng Guest

    Pardon my ignorance, I'm not that great with Linux.

    I installed Ruby 1.8.2 from source just now, everything went fine. I the=
    n
    attempted to install gems which seemed to go fine until the end, when I
    got a stack trace trying to require zlib[1].

    When trying to require zlib from irb, I get:
    LoadError: No such file to load -- zlib

    I thought maybe I had to install the zlib extension manually so I went
    into my ruby-source/ext/zlib and ran extconf, and got this:
    checking for deflateReset() in -lz... no
    checking for deflateReset() in -llibz... no
    checking for deflateReset() in -lzlib... no

    I see the appropriate zlib.h and libz.* files in the obvious places
    (/usr/include and /usr/lib).

    Can anyone point me in the right direction to getting gems fully
    installed? Thanks!



    [1]:
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require__':
    No such file to load -- zlib (LoadError)
    from
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
    from
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require__'
    from
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:1
    from
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require__'
    from
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:61:in
    `manage_gems'
    ... 7 levels...
    from setup.rb:887:in `exec_install'
    from setup.rb:705:in `invoke'
    from setup.rb:674:in `invoke'
    from setup.rb:1352
     
    Joe Cheng, Jul 30, 2005
    #1
    1. Advertisements

  2. Joe Cheng

    Joe Cheng Guest

    Sorry, forgot to mention what version of Linux I am using: Fedora Core 3,
    kernel 2.6.9-1.667. Also, gcc version 3.4.2 20041017, zlib 1.2.1.2
    20040909. Thanks.
     
    Joe Cheng, Jul 30, 2005
    #2
    1. Advertisements

  3. ------=_Part_7677_13490130.1122699124699
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    =20
    installed Ruby 1.8.2 from source just now, everything went fine. I then
    Install zlib-devel by running:
    yum install zlib-devel
    or=20
    up2date zlib-devel
    Then run=20
    ./configure --prefix=3D/usr
    make
    make install
    on Ruby 1.8.2 again. Should work fine.
    =20



    --=20
    Robert W. Oliver II
    CEO / President - OCS Solutions, Inc.
    http://www.ocssolutions.com/

    Ruby / Ruby on Rails Discussion at http://www.rubyforums.com/

    ------=_Part_7677_13490130.1122699124699--
     
    Robert Oliver, Jul 30, 2005
    #3
  4. Joe Cheng

    Joe Cheng Guest

    Install zlib-devel by running:
    Woohoo! That worked, once I cleared the stuff out of /usr/local that
    resulted from my first attempt at installing Ruby.

    Thanks a lot!
     
    Joe Cheng, Jul 30, 2005
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.