在Ubuntu 14.04上rbenv构建失败

Dan*_*nds 22 ruby ubuntu rbenv

我已经在我的Ubuntu 14.04桌面上成功安装了rbenv(以及构建工具),这似乎工作正常,但是当我尝试安装ruby 2.1.1时,构建失败:

daniel@grape:~$ rbenv install 2.1.1
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/daniel/.rbenv/versions/2.1.1

Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20140418142258.3543
Results logged to /tmp/ruby-build.20140418142258.3543.log

Last 10 log lines:
installing default ripper libraries
compiling ossl_pkcs7.c
compiling ossl_ssl.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory `/tmp/ruby-build.20140418142258.3543/ruby-2.1.1/ext/openssl'
linking shared-object ripper.so
make[2]: Leaving directory `/tmp/ruby-build.20140418142258.3543/ruby-2.1.1/ext/ripper'
make[1]: Leaving directory `/tmp/ruby-build.20140418142258.3543/ruby-2.1.1'
make: *** [build-ext] Error 2
Run Code Online (Sandbox Code Playgroud)

日志文件的内容可以在这里找到:http://pastebin.com/SXxTeCJY

我已经做了一些寻求这个问题的帮助,包括按照这里所说的:https://github.com/sstephenson/ruby-build/wiki - 但我没有任何快乐.

Dyl*_*kow 39

更新:使用Ruby 2.1.2,它解决了这个问题.


14.04可能与readline 6.3一起发货,而rl_hook_func_t不是使用Function.

这个bug已经在Ruby(https://bugs.ruby-lang.org/issues/9578)中报告并修复,但尚未发布.

在Ruby 2.1.2发布之前(我假设它将包含此修复),您可以使用补丁来正确支持新rl_hook_func_t方法.使用它来安装Ruby 2.1.1:

curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1
Run Code Online (Sandbox Code Playgroud)

(来源:http://gorails.com/setup/ubuntu/14.04)