0

I'm trying to install ruby version 2.0.0-p353 using rbenv but it's throwing an error and outputting the following:

linking shared-object openssl.so
installing default openssl libraries
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/openssl'
make[2]: Entering directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/pathname'
compiling pathname.c
linking shared-object pathname.so
installing default pathname libraries
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/pathname'
make[2]: Entering directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/psych'
compiling psych.c
compiling psych_parser.c
compiling psych_emitter.c
compiling psych_to_ruby.c
compiling psych_yaml_tree.c
linking shared-object psych.so
installing default psych libraries
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/psych'
make[2]: Entering directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/pty'
compiling pty.c
pty.c: In function ‘chfunc’:
pty.c:143:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
     seteuid(getuid());
            ^
linking shared-object pty.so
installing default pty libraries
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/pty'
make[2]: Entering directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/racc/cparse'
compiling cparse.c
linking shared-object racc/cparse.so
installing default cparse libraries
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/racc/cparse'
make[2]: Entering directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/readline'
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1886:26: error: ‘Function’ undeclared (first use in this function)
     rl_pre_input_hook = (Function *)readline_pre_input_hook;
                          ^
readline.c:1886:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1886:36: error: expected expression before ‘)’ token
     rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                    ^
readline.c: At top level:
readline.c:530:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
 readline_pre_input_hook(void)
 ^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20140828155903.3436/ruby-2.0.0-p353'
make: *** [build-ext] Error 2

Solution Turns out this issue is actually quite common and there's a whole bunch of discussion about it here: https://github.com/sstephenson/ruby-build/issues/526

The issue was resolved for me by using this call found at that link:

$ RUBY_CONFIGURE_OPTS=--with-readline-dir="/usr/lib/x86_64-linux-gnu/libreadline.so" rbenv install 2.0.0-p353
keybored
  • 5,194
  • 13
  • 45
  • 70
  • What version of rbenv are you using? What command are you giving rbenv? And why install Ruby 2.0.0? – the Tin Man Aug 28 '14 at 21:21
  • rbenv 0.4.0-98-g13a474c // rbenv install 2.0.0-p353 // It's the version that the project I inherited requires to run. – keybored Aug 28 '14 at 21:46

0 Answers0