ruby - rbenv 构建在 Ubuntu 14.04 上失败

标签 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

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

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

最佳答案

更新:使用 Ruby 2.1.2,它修复了这个问题。


14.04 可能随 readline 6.3 一起发布,它使用 rl_hook_func_t 而不是 Function

此错误已在 Ruby 中报告和修复 (https://bugs.ruby-lang.org/issues/9578),但尚未发布。

在 Ruby 2.1.2 发布之前(我假设它会包含此修复),您可以使用 patch正确支持新的 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 - rbenv 构建在 Ubuntu 14.04 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23155289/

相关文章:

linux - 停止用户访问系统几天

ruby - 全新应用程序服务器上的 Rails 'parse_query' 错误

javascript - Ruby On Rails before_filter 调用了两次?

node.js - 对 BeagleBone 进行编程以打开 LED,出现 NodeJS 错误

linux - 手动运行 crontab cron.hourly 返回丢失文件错误

ruby-on-rails - unicorn 服务 Upstart 脚本抛出 "-su: bundle: command not found"

ruby - rbenv 无法安装 rubinius

ruby-on-rails - Rails CANCAN - 第一次点击无访问权限

ruby - 我在 ruby​​ 中安装 Mechanize 时的一些问题

ruby - "newed"我类的类(class)名称