Homebrew pyenv install error dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

十年热恋 提交于 2019-12-05 21:18:49

The solution for me was to force link the readline 8 lib that I had under /usr/local/opt/readline/lib/.

> cd /usr/local/opt/readline/lib/
> ls
libhistory.8.0.dylib  libhistory.a          libreadline.8.dylib   libreadline.dylib
libhistory.8.dylib    libhistory.dylib      libreadline.8.0.dylib libreadline.a         pkgconfig

Since I have a newer version of the readline lib, I tried to force it to find the one I have by symlinking it to the filename it was looking for. e.g.

> cd /usr/local/opt/readline/lib/
> ln -s libreadline.8.0.dylib libreadline.7.dylib
> ls
libhistory.8.0.dylib  libhistory.a          libreadline.7.dylib   libreadline.8.dylib   libreadline.dylib
libhistory.8.dylib    libhistory.dylib      libreadline.8.0.dylib libreadline.a         pkgconfig

pyenv install x.y.z should now be working (or at least throw a different error ;).

ln -sf /usr/local/opt/readline/lib/libreadline.8.0.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!