2014-04-20 165 views
6

我是很新的rbenv更不用說紅寶石和有一些困難,診斷以下安裝失敗: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

回答

8

似乎有一個問題自制軟件包「readline」。

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

然後重試安裝紅寶石

rbenv install 2.0.0-p0 

答發現由於https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071

+0

謝謝,這工作。那麼從日誌中的哪一行發現了你? – kaizenCoder

+1

說實話,所有的功勞都發給了寫這篇文章的人:https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071 –

+0

@ Lv.BeLeCk我在這裏遇到了同樣的問題最新版本的Ruby。我在Ubuntu上。當我輸入brew命令時,我被告知不存在這樣的命令,即使在運行git時也是如此。我該怎麼辦? –