Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
6
Help us understand the problem. What is going on with this article?
@hoisjp

Error Shooting for rbenv and readline "Libraty not loaded"

More than 5 years have passed since last update.

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. :)
6
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
hoisjp
平岡一成 ひらおかいっせい Cloud Solution Architect at Microsoft Japan. All posts are my own.

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
6
Help us understand the problem. What is going on with this article?