库未加载:/usr/local/opt/readline/lib/libreadline.7.dylib [英] Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

查看:240
本文介绍了库未加载:/usr/local/opt/readline/lib/libreadline.7.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行rails console时,出现此错误:

When I try running rails console I get this error:

/Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require':
 dlopen(/Users/TuzsNewMacBook/.rvm/rubies/ruby-2.3.7/lib/ruby/2.3.0/x86_64-darwin18/readline.bundle, 9): 
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)

快速搜索使我这篇文章并且我尝试了一些事情:

A quick search got me to this post and I've tried a few things:

brew reinstall postgresql(这确实是该项目的数据库)

brew reinstall postgresql (this is indeed the DB for this project)

cd /usr/local/opt/readline/lib    
ln libreadline.8.0.dylib libreadline.6.2.dylib

(我的readline版本是8)

(my version of readline is 8)

brew link readline --force

但是这些都没有修复它.

But none of these have fixed it.

我最近在项目中添加了pry-coollineguardguard-livereload宝石(如果有什么区别的话)(在这些之前,rails console加载良好).我正在使用最新的macOS.

I recently added pry-coolline, guard and guard-livereload gems to my project if that makes any difference (rails console loaded fine before those). I'm running on the latest macos.

(更新)我将撬轨用作滑轨控制台,如果有什么不同的话.

(Update) I’m using pry rails as my rails console, if that makes any difference.

有帮助吗?谢谢.

推荐答案

搜索/usr/local/opt/readline/lib/libreadline.7.dylib时似乎引发了错误.

the error seems to be thrown when searching for /usr/local/opt/readline/lib/libreadline.7.dylib.

您是否尝试过符号链接?

Have you tried to symlink that?

类似:

cd /usr/local/opt/readline/lib 
ln -s libreadline.8.0.dylib libreadline.7.dylib

只需在macOS Mojave,ruby 2.5.3p105和Rails 5.2.2上进行尝试即可.

Just tried that on macOS Mojave, ruby 2.5.3p105 and Rails 5.2.2 and worked.

这篇关于库未加载:/usr/local/opt/readline/lib/libreadline.7.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆