zlib error while installing gems on Linux

J

Joe Cheng

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
 
J

Joe Cheng

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.
 
R

Robert Oliver

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

On 7/29/05 said:
=20
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.

=20
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=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--
 
J

Joe Cheng

Install zlib-devel by running:
yum install zlib-devel
or
up2date zlib-devel
Then run
./configure --prefix=3D/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!
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top