rbenv安装Ruby BUILD FAILED。

11

我对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

查看完整日志请点击此处

2个回答

10
似乎 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提供的答案。


谢谢,那个有效。那么日志中的哪一行让您发现问题呢? - kaizenCoder
1
说实话,所有的功劳都归于在 https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071 发布此帖子的人。 - Lv.BeLeCk
@Lv.BeLeCk,我在最新版本的Ruby上也遇到了同样的问题。我使用的是Ubuntu系统。当我输入brew命令时,即使运行git,系统也显示没有此类命令。我该怎么办? - Jonathan Musso

1

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

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


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接