0

I'm trying to install ruby 2.0.0-p247 with rbenv but the build keeps failing. It did work before:

$ rbenv versions
  system
  2.0.0-p195
  2.0.0-p353
* 2.1.0 (set by /Users/nemo/.ruby-version)

I looked at Using rbenv install throws an error and tried the suggestion but it didn't help

I tried the following before trying to install

sudo rm -rf /var/folders/yt/5nww85g11gdgqcz4tcl1dndc0000gn/T/*
sudo rm -rf /tmp/ruby*

$ brew update
Already up-to-date.
$ brew doctor
Your system is ready to brew.

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

$ sudo rbenv install 2.0.0-p451
 Last 10 log lines:
 installing default openssl libraries
 linking shared-object dl/callback.bundle
 ld: warning: directory not found for option '-L/Users/nemo/.rbenv/versions/2.0.0-p451/lib'
 linking shared-object openssl.bundle
 ld: warning: directory not found for option '-L/Users/nemo/.rbenv/versions/2.0.0-p451/lib'
 linking shared-object nkf.bundle
 ld: warning: directory not found for option '-L/Users/nemo/.rbenv/versions/2.0.0-p451/lib'
 linking shared-object ripper.bundle
 ld: warning: directory not found for option '-L/Users/nemo/.rbenv/versions/2.0.0-p451/lib'

What else I could try?

Community
  • 1
  • 1

2 Answers2

1

I found the solution here: https://github.com/Homebrew/homebrew/issues/28651

basically:

brew uninstall readline
brew install readline

solved the issue

0

This can happen when the appropriate (i.e., writable) directory permission of ~/.rbenv/versions/YOUR_VERSION/ is not given for the user who runs rbenv install.

Obviously it is very unlikely to be the case in the op's situation where sudo is used. However, if the rbenv environment has been set up by the superuser and if you nevertheless run rbenv install as a non-privileged user (without sudo), the process fails to create the directory like lib/ under the said directory and so fails fatally. The event of the failure (in creating the directory) is not explicitly reported in the error message as of rbenv 1.1.2 and so may be slightly perplexing.

Masa Sakano
  • 1,921
  • 20
  • 32