【问题标题】:rbenv install ruby BUILD FAILEDrbenv 安装 ruby​​ 构建失败
【发布时间】:2014-04-20 02:04:49
【问题描述】:

我对 rbenv 还很陌生,更不用说 ruby​​,而且在诊断以下安装失败时遇到了一些困难:

rbenv install 2.0.0-p0
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /Users/Haani/.rbenv/versions/2.0.0-p0

Downloading ruby-2.0.0-p0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/50d307c4dc9297ae59952527be4e755d
Installing ruby-2.0.0-p0...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/50/wzjqg8d11sn7xnkrsmgr1gn80000gn/T/ruby-build.20140420110650.75863
Results logged to /var/folders/50/wzjqg8d11sn7xnkrsmgr1gn80000gn/T/ruby-build.20140420110650.75863.log

Last 10 log lines:
compiling ossl_x509cert.c
compiling ossl_x509crl.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
make: *** [build-ext] Error 2

查看完整日志here

【问题讨论】:

    标签: ruby rbenv


    【解决方案1】:

    Homebrew 包“readline”似乎有问题。

    brew uninstall readline
    brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
    brew pin readline
    

    然后重试安装 ruby​​

    rbenv install 2.0.0-p0
    

    感谢https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071找到答案

    【讨论】:

    • 谢谢,成功了。那么日志中的哪一行提示了您?
    • 老实说,所有的功劳都归功于在github.com/sstephenson/rbenv/issues/579#issuecomment-41122071发帖的人
    • @Lv.BeLeCk 我在使用最新版本的 Ruby 时遇到了同样的问题。我在 Ubuntu 上。当我输入 brew 命令时,我被告知不存在这样的命令,即使在运行 git 时也是如此。我该怎么办?
    【解决方案2】:

    我需要更新我的命令行工具。

    sudo rm -rf /Library/Developer/CommandLineTools 然后 sudo xcode-select --install

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-21
      • 2020-01-21
      • 2022-07-12
      • 2020-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多