LoginSignup
9
3

More than 5 years have passed since last update.

MacOSX EL Capitan 10.11.6 で "dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib"

Last updated at Posted at 2017-02-09

環境: Mac OSX EL Capitan 10.11.6

現象

エラーは以下のようなもの。
rbenv installに合わせて行われる、ruby-buildのconfigureの際に発生。

configure: creating ./config.status
config.status: creating GNUmakefile
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
  Referenced from: /usr/local/bin/awk
  Reason: image not found
./config.status: line 1009: 52105 Done                    eval sed \"\$ac_sed_extra\" "$ac_file_inputs"
     52106 Trace/BPT trap: 5       | $AWK -f "$ac_tmp/subs.awk" > $ac_tmp/out
config.status: error: could not create GNUmakefile

どこかでbrew updateした際にバージョンが替わってしまったのだろうか、
libreadline.6.dylibがないと怒られるので brew list readline で見てみると
readlineは7.0.1となっていた。

解決方法

調べてみるとbashをupdateせよ、直接readlineをソースダウンロードせよ
などを言われているがどれも解決には繋がらなかった:(

結局強引にシンボリックを貼って解決(?)とした。

ln -s /usr/local/opt/readline/lib/libreadline.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
9
3
2

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
9
3