Zlib error while installing gems on Linux

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

I installed Ruby 1.8.2 from source just now, everything went fine. I then
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

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.

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<http://1.2.1.2>
20040909. Thanks.

installed Ruby 1.8.2 from source just now, everything went fine. I then

attempted to install gems which seemed to go fine until the end, when I
got a stack trace trying to require zlib[1].

Install zlib-devel by running:
yum install zlib-devel
or
up2date zlib-devel
Then run
./configure --prefix=/usr
make
make install
on Ruby 1.8.2 again. Should work fine.

···

On 7/29/05, Joe Cheng <code@joecheng.com> wrote:

--
Robert W. Oliver II
CEO / President - OCS Solutions, Inc.

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

Install zlib-devel by running:
yum install zlib-devel
or
up2date zlib-devel
Then run
./configure --prefix=/usr
make
make install
on Ruby 1.8.2 again. Should work fine.

Woohoo! That worked, once I cleared the stuff out of /usr/local that
resulted from my first attempt at installing Ruby.

Thanks a lot!