LoginSignup
8
6

More than 5 years have passed since last update.

Error Shooting for rbenv and readline "Libraty not loaded"

Last updated at Posted at 2014-03-09

Things

Env

  • Mac 10.7
  • rbenv -v rbenv 0.4.0
    • rbenv install 1.9.3-p545
  • brew -v Homebrew 0.9.5

Steps

After ruby install,

RUBY_CONFIGURE_OPTS="--enable-shared --with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl) --with-libyaml-dir=$(brew --prefix libyaml)" rbenv install 1.9.3-p545 -v

Library not loaded. :(

/Users/hogehoge/.rbenv/versions/1.9.3-p545/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/hogehoge/.rbenv/versions/1.9.3-p545/lib/ruby/1.9.1/x86_64-darwin11.4.2/readline.bundle, 9): Library not loaded: @@HOMEBREW_PREFIX@@/opt/readline/lib/libreadline.6.2.dylib (LoadError)
  Referenced from: /Users/hoisjp/.rbenv/versions/1.9.3-p545/lib/ruby/1.9.1/x86_64-darwin11.4.2/readline.bundle
  Reason: image not found - /Users/hoisjp/.rbenv/versions/1.9.3-p545/lib/ruby/1.9.1/x86_64-darwin11.4.2/readline.bundle

Solution

  • 1. reinstall readline
$ brew list readline
/usr/local/Cellar/readline/6.2.4/include/readline/ (8 files)
/usr/local/Cellar/readline/6.2.4/lib/libhistory.6.2.dylib
/usr/local/Cellar/readline/6.2.4/lib/libreadline.6.2.dylib
/usr/local/Cellar/readline/6.2.4/lib/ (6 other files)
/usr/local/Cellar/readline/6.2.4/share/man/ (2 files)
/usr/local/Cellar/readline/6.2.4/share/readline/ (11 files)

$ brew uninstall readline
$ brew install readline
  • 2. brew link (maybe no need.)
$ brew link --force readline
  • 3. Resolved. :)
8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6