I can't get rubygems to install, and I don't understand what the problem is or what to do about it.
I'm running on Kubuntu Linux 8.04.1
I compiled ruby-1.8.6-p114 a couple of days ago. Note:
tomc@tom-desktop:/$ which ruby
/usr/local/bin/ruby
tomc@tom-desktop:/$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]
tomc@tom-desktop:/$
I downloaded rubygems-1.2.0.tgz, unpacked it into /usr/local/src/.
Then...
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)
from ./lib/rubygems/spec_fetcher.rb:1
from ./lib/rubygems/source_index.rb:10:in `require'
from ./lib/rubygems/source_index.rb:10
from ./lib/rubygems.rb:767:in `require'
from ./lib/rubygems.rb:767
from setup.rb:22:in `require'
from setup.rb:22
A couple of listings which may help
my ruby compile listing: http://pastie.org/275615
output of "$ locate zlib" => http://pastie.org/275612
I'm barely able to do this stuff, and certainly don't understand what the complaint is about. I've had one kind, knowing soul look at this and he didn't find the problem. To someone here, I'm sure it'll be obvious. I sure hope he/she reads this!
Thanks,
Tom
···
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 <zlib.h>
/* 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/\.