11

I'm quite new to rbenv let alone ruby and having some difficulty diagnosing the following installation failure:

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

See full log here

kaizenCoder
  • 2,211
  • 6
  • 33
  • 64

2 Answers2

10

There seems to be a problem with the Homebrew package "readline".

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

Then retry installing ruby with

rbenv install 2.0.0-p0

Answer found thanks to https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071

Lv.BeLeCk
  • 420
  • 3
  • 9
  • Thanks, that worked. So which line from the log tipped you off? – kaizenCoder Apr 25 '14 at 00:02
  • 1
    To be honest, all the credit goes to the person who wrote the post at https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071 – Lv.BeLeCk Apr 25 '14 at 14:46
  • @Lv.BeLeCk I am having the same problem here with the latest version of Ruby. I am on Ubuntu. When I enter the brew commands I am told no such command exists, even when running git. What should I do? – Jonathan Musso Jan 07 '15 at 04:52
1

I needed to update my command line tools.

sudo rm -rf /Library/Developer/CommandLineTools Then sudo xcode-select --install

RTasche
  • 2,614
  • 1
  • 15
  • 19
vladiim
  • 1,862
  • 2
  • 20
  • 27