From: Brian Candler Date: 2008-09-19T18:09:23+09:00 Subject: Re: rubygems won't install - don't understand why > tomc@tom-desktop:/usr/local/src/rubygems-1.2.0$ ruby setup.rb > ./lib/rubygems/spec_fetcher.rb:1:in `require': no such file to load -- > zlib (LoadError) I run Ubuntu 8.04.1 with my own compiled ruby 1.8.6p114, which is very close to your setup. The extension exists in /usr/local/lib/ruby/1.8/i686-linux/zlib.so Possibly, the package zlib1g-dev wasn't present on your system at the time when you compiled ruby, and therefore the Ruby zlib extension wasn't built. If your build directory is still around (i.e. where you untarred the source), look in ext/zlib/mkmf.log and see if it points to the problem. Here's mine: have_library: checking for deflateReset() in -lz... -------------------- yes "gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -g -O2 conftest.c -L'.' -L'../..' -L. -rdynamic -Wl,-export-dynamic -lruby-static -lz -ldl -lcrypt -lm -lc" conftest.c: In function ‘t’: conftest.c:3: error: ‘deflateReset’ undeclared (first use in this function) conftest.c:3: error: (Each undeclared identifier is reported only once conftest.c:3: error: for each function it appears in.) checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { void ((*volatile p)()); p = (void ((*)()))deflateReset; return 0; } /* end */ "gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -g -O2 conftest.c -L'.' -L'../..' -L. -rdynamic -Wl,-export-dynamic -lruby-static -lz -ldl -lcrypt -lm -lc" checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { deflateReset(); return 0; } /* end */ -------------------- have_header: checking for zlib.h... -------------------- yes "gcc -E -I../.. -I../../. -I../.././ext/zlib -g -O2 conftest.c -o conftest.i" checked program was: /* begin */ 1: #include /* end */ -------------------- In any case, the thing to do now is recompile ruby, and carefully look at the ./configure output to see if it says why zlib isn't being built. It may also be helpful to install libssl-dev first, if you haven't already. HTH, Brian. -- Posted via http://www.ruby-forum.com/.