I have problems compiling Ruby on a DigitalOcean Droplet.
rbenv 0.4.0-97-gfe0b243
Ubuntu 14.04 LTS
Linux bashman 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
rbenv install 2.1.1
gives me: https://gist.github.com/astropanic/e4d3a3602612b3c21636
The failure seems to be related to:
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1977:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:634: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.20140502004823.5335/ruby-2.1.1/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20140502004823.5335/ruby-2.1.1'
make: *** [
build-ext] Error 2
Any ideas ?
The failure to build ruby 2.1 because of readline appears to be a known error.
I was successful building it using one of the suggested patches like this:
curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1
Downgrading the readline library to version 6.2.4 is an alternative suggestion but I haven't tried that.
Following will solve your problem:
sudo apt install libssl1.0-dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With