我已经在我的Ubuntu 14.04桌面上成功安装了rbenv(以及构build工具),看起来工作正常,但只要我尝试安装ruby 2.1.1,构build失败:
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
日志文件的内容可以在这里find: http : //pastebin.com/SXxTeCJY
我已经做了一些寻求这个问题的帮助,包括以下说: https : //github.com/sstephenson/ruby-build/wiki – 但我没有任何的喜悦。
更新 :使用Ruby 2.1.2,它修复了这个问题。
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
(来源: http : //gorails.com/setup/ubuntu/14.04 )
更新 :Ruby 2.1.2,修复了这个问题。 如果你需要补丁红宝石与厨师另一个原因按照这里的例子。
在Trusty Ubuntu(14.04)上使用Riotgames rbenv cookbook修补Ruby 2.1.1的代码 – 剪切和粘贴 – 没有保修:-) 我有一个在Ubuntu 14.04(1.0.4版)上测试过的包装食谱 。 最简单的方法就是克隆存储库并将其集中到测试厨房。 主要的问题是,食谱使用Berkshelf 3.1.1,大多数人可能还在2。 粘贴的代码应该在Berkshelf 2.x和3.1.1上工作。
Berksfile
cookbook 'rbenv', github: "RiotGames/rbenv-cookbook"
元数据
depends 'rbenv'
属性(attributes / default.rb)
default['ruby']['version'] = '2.1.1'
食谱(recipes / default.rb)
# patchutils is required to patch Ruby version package 'patchutils' include_recipe "rbenv::default" include_recipe "rbenv::ruby_build" # Installs a patched, global, ruby rbenv_ruby node['ruby']['version'] do global true patch "https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45225/diff?format=diff" end
讨论补丁
丰富