Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rbenv/ruby-build and shared libraries (libruby.so)

Tags:

ruby

rbenv

I am trying to to use rbenv with ruby-build.

After seemingly successful installation of both tools and ruby version I cannot find the shared library libruby.so

Are there are any specific instructions that I have to give to rbenv/ruby-build when I am installing ruby?

Have tried with ruby 2.1.0 and 2.1.2.

Any help would be appreciated!

like image 657
alexs333 Avatar asked Mar 19 '23 12:03

alexs333


1 Answers

When compiling Ruby from source, you need to set --enable-shared to build shared libraries. With Rbenv, you can try to set this in RUBY_CONFIGURE_OPTS before installing Ruby:

export RUBY_CONFIGURE_OPTS="--enable-shared"
rbenv install 2.1.2

Or alternatively:

RUBY_CONFIGURE_OPTS="--enable-shared" rbenv install 2.1.2
like image 111
Patrick Oscity Avatar answered Mar 27 '23 21:03

Patrick Oscity