rubygem setup.rb failing

  • Thread starter Michael Satterwhite
  • Start date
M

Michael Satterwhite

I'm having to setup multiple machines, and I've got a new problem (at
least each time my problem is new ... I'm not repeating the old ones)

I've compiled ruby and installed it - I've put it into /usr/local/bin,
if that's a problem, I can redo it to whereever. Note that I didn't see
any errors in the ruby compile / install

Next was an attempt to install rubygems. I ran
ruby setup.rb

from the directory with rubygems. It starts out OK, then I get
-------------------------
/usr/local/lib/ruby/1.8/i686-linux/syck.so:
/usr/local/lib/ruby/1.8/i686-linux/syck.so: undefined symbol:
__stack_chk_fail_local - /usr/local/lib/ruby/1.8/i686-linux/syck.so
(LoadError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/1.8/yaml/syck.rb:5
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/1.8/yaml.rb:11
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:6
... 11 levels...
from setup.rb:887:in `exec_install'
from setup.rb:705:in `invoke'
from setup.rb:674:in `invoke'
from setup.rb:1352
------------------------------------------

Either I'm missing something - or my ruby install wasn't as clean as it
looked. I looked at the source, and I thought that all I needed to do
was install the yaml and syck files onto the machine (I'm running
kubuntu) - but that didn't seem to do any good.

Would someone be so kind as to help here.

Thanks in advance
---Michael
 
J

James Britt

Michael said:
...
Either I'm missing something - or my ruby install wasn't as clean as it
looked. I looked at the source, and I thought that all I needed to do
was install the yaml and syck files onto the machine (I'm running
kubuntu) - but that didn't seem to do any good.

I've installed ruby and rubygems on Kubuntu recently. No links handy
off the top of my head, but Google for ruby+rails+rubygems+ubuntu.
There are few sites that give very nice apt-get instructions to ensure
you can correctly compile Ruby and get gems running.

The default install on Unbuntu is lacking some things needed by
Ruby/Rubygems. (zlib comes to mind, and I had a problem with ssh
recently as well.)
 
A

ara.t.howard

I'm having to setup multiple machines, and I've got a new problem (at
least each time my problem is new ... I'm not repeating the old ones)

I've compiled ruby and installed it - I've put it into /usr/local/bin,
if that's a problem, I can redo it to whereever. Note that I didn't see
any errors in the ruby compile / install

Next was an attempt to install rubygems. I ran
ruby setup.rb

from the directory with rubygems. It starts out OK, then I get
-------------------------
/usr/local/lib/ruby/1.8/i686-linux/syck.so:
/usr/local/lib/ruby/1.8/i686-linux/syck.so: undefined symbol:
__stack_chk_fail_local - /usr/local/lib/ruby/1.8/i686-linux/syck.so
(LoadError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/1.8/yaml/syck.rb:5
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/1.8/yaml.rb:11
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:6
... 11 levels...
from setup.rb:887:in `exec_install'
from setup.rb:705:in `invoke'
from setup.rb:674:in `invoke'
from setup.rb:1352
------------------------------------------

Either I'm missing something - or my ruby install wasn't as clean as it
looked. I looked at the source, and I thought that all I needed to do
was install the yaml and syck files onto the machine (I'm running
kubuntu) - but that didn't seem to do any good.

Would someone be so kind as to help here.

Thanks in advance
---Michael

i'm guessing you have more that one ruby installs on your system and compiled
without setting LD_RUN_PATH or LD_LIBRARY_PATH.

for any c code you compile you always want to consider these two env vars and
their effect on ld.so.

if installing into /usr/local/bin you'd want to do this

export LD_RUN_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib

./configure --prefix=/usr/local && make && sudo make install

export PATH=/usr/local/bin:$PATH

and ruby should work. to confirm that this might be your problem try

which -a ruby

if you see two the above is likely. man ld.so.conf or google
LD_RUN_PATH/LD_LIBRARY_PATH for more.

this is incomplete, but it might shed some light

http://sciruby.codeforpeople.com/sr.cgi/HowTosAndTutorials/CompilationFuTutorial

regards.

-a
 

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

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top