LoginSignup
0
0

More than 5 years have passed since last update.

brew upgradeしたらbower:install実行時にlibreadlineが読み込めない

Last updated at Posted at 2017-01-28

brew upgradeした後、bundle exec rake bower:install:developmentしたら、
次のようなエラーが発生した。

rake aborted!
LoadError: dlopen(.../ruby/2.3.0/x86_64-darwin14/readline.bundle, 9):
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib

/usr/local/Cellar/readline/の中に7.0.16.3.8の2つのディレクトリがあり、上のエラーメッセージでは6が見つからないと言う。

一方、/usr/local/opt/readline/usr/local/Cellar/readline/7.0.1のシンボリックリンクになっていたので、これを6.3.8に張り直すとエラーは発生しなくなった。


同僚から「ruby再インストールしたらいいんじゃないの」と聞いたので試してみたら、元のreadlineで直ったので追記。

% rbenv uninstall 2.3.3
% rbenv install 2.3.3
ruby-build: use openssl from homebrew
Downloading ruby-2.3.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.bz2
Installing ruby-2.3.3...
ruby-build: use readline from homebrew

↑古いreadlineでビルドされたRubyだったから動けなくなってたみたいだ。

ただ本件とは関係ないかもしれないが、Rubyを再インストールしたことでnokogiriなどのインストールで失敗するようになってしまった。
これに対しては、brew link --force libxml2を叩いてlibxml2のリンクを作ることで解消したので併せて書いておく。

0
0
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
0
0