简体   繁体   English

在Ubuntu 14.04上rbenv构建失败。 必须使用ruby 2.0.0-p451

[英]rbenv build failed on Ubuntu 14.04. Must use ruby 2.0.0-p451

I am attempting to build a project in Ruby using rbenv, but get a build error when I run: 我正在尝试使用rbenv在Ruby中构建项目,但是在运行时出现构建错误:

rbenv install 2.0.0-p451

I get a build error: 我收到一个构建错误:

BUILD FAILED (Ubuntu 14.04 using ruby-build 20141208)

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

According to this post ( rbenv build failed on Ubuntu 14.04 ), this is a problem with Ubuntu 14.4, which ships with readline 6.3, and uses rl_hook_func_t instead of Function. 根据这篇文章( rbenv构建在Ubuntu 14.04上失败 ),这是Ubuntu 14.4的问题,后者随readline 6.3一起提供,并使用rl_hook_func_t代替Function。 I don't really know what this means, but unfortunately the solution in this post is to simply use Ruby 2.1.1. 我真的不知道这意味着什么,但是不幸的是,本文中的解决方案是仅使用Ruby 2.2.1。 I cannot use another version of Ruby for this project, so I need a solution that will work in this version of Ruby and Ubuntu. 我不能为此项目使用其他版本的Ruby,因此我需要一个可以在此版本的Ruby和Ubuntu中运行的解决方案。

Side note, I am currently using RVM. 旁注,我目前正在使用RVM。 It works, but I am having issues that I had hoped would be solved by using rbenv. 它可以工作,但是我遇到了希望通过使用rbenv解决的问题。

Following the answer here: 在这里遵循答案:

https://stackoverflow.com/a/23155490/254936 https://stackoverflow.com/a/23155490/254936

If you look at the comment at the bottom of the linked gist here: 如果您在此处查看链接要点底部的评论:

https://gist.github.com/mislav/a18b9d7f0dc5b9efc162 https://gist.github.com/mislav/a18b9d7f0dc5b9efc162

Someone notes that they created a patch for Ruby 2.0.0-p451, here: 有人指出,他们为Ruby 2.0.0-p451创建了一个补丁,如下所示:

https://gist.github.com/riocampos/b2669b26016207224f06 https://gist.github.com/riocampos/b2669b26016207224f06

I recommend trying that one, with the same patch instructions in the SO answer linked above. 我建议尝试使用上面链接的SO回答中的补丁说明相同的补丁。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM