问题处理:Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
进入rails 文件夹, terminal输入rails console报告❌。
类似下面的
Running via Spring preloader in process
Traceback (most recent call last):
: from -e::in `<main>'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./rubygems/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./rubygems/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `load'
...
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `load_dependency'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `block in require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require_with_bootsnap_lfi'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/loaded_features_index.rb::in `register'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `block in require_with_bootsnap_lfi'
/Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require': dlopen(/Users/wemteq/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin17/readline.bundle, 9):
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
Referenced from: /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./x86_64-darwin17/readline.bundle
Reason: image not found - /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./x86_64-darwin17/readline.bundle
直接google,
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
就能找到stackoverflow的答案。
原因是homebrew更新了libhistory的版本到8.0。
而rails的默认配置是7.0找不到对应的库。因此建立一个符号连接即可。
cd /usr/local/opt/readline/lib/
ls -l
//可以看到这个文件夹下的文件的版本是libhistory.8.0.dylib
//所以在这个文件夹下添加一个符号连接,使用命令ln -s(bash命令)
ln -s libhistory.8.0.dylib libhistory..dylib
然后rails c就可以正确打开了。
问题处理:Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)的更多相关文章
- dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Table of Contents 1. 启动时报错 ...
- dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
本地环境报错有 3 处,如下: 1. 执行命令,无论执行 php 的什么命令,统一报错 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libic ...
- 【Python MySQLdb】Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib解决办法
使用MySQLdb遇到以下错误 ImportError: dlopen(/Users/jackey/Documents/Xiaomi/Code/wda_python/lib/python2./site ...
- 解决Xcode10 Library not loaded: /usr/lib/libstdc++.6造成的crash及报错
关键字1:dyld: Library not loaded: /usr/lib/libstdc++.6.dylib Referenced from: 关键字2:Reason: no suitabl ...
- CentOS安装软件出现错误:bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
CentOS安装软件出现错误: bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or d ...
- /usr/local /opt
Linux 的软件安装目录是也是有讲究的,理解这一点,在对系统管理是有益的 /usr:系统级的目录,可以理解为C:/Windows/, /usr/lib理解为C:/Windows/System32. ...
- PHP提示dyld: Library not loaded问题解决
Mac在命令行执行php命令时,如php -v 有错误提示: dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0..d ...
- 转:linux下面/usr/local和opt目录有何区别
/usr/local下一般是你安装软件的目录,这个目录就相当于在windows下的programefiles这个目录 /opt这个目录是一些大型软件的安装目录,或者是一些服务程序的安装目录 /opt ...
- Linux下面/usr/local和opt目录
1./opt This directory is reserved for all the software and add-on packages that are not part of the ...
随机推荐
- Java图片合并
/** * 纵向合并图片,ossObject.getObjectContent()返回InputStream对象 */ private BufferedImage mergeImage(List< ...
- 前端模板 artTemplate之辅助方法template.helper
var labelMap = { onlinePayment:{ label:"在线支付", desc:"支持大部分储蓄卡.信用卡及第三方平台支付", name ...
- 快速排序算法回顾 (Python实现)
#这个也是快速排序-------------------------------------------------- def qsort(list): if list==[]: return [] ...
- office 2016密钥
Office 2016 Pro Plus Retail 版激活密钥:[Key]:3XJTG-YNBMY-TBH9M-CWB2Y-YWRHH[Key]:6TCQ3-NBBJ2-RTJCM-HFRKV-G ...
- 5、 LwIP协议栈规范翻译——操作系统仿真层
为了使lwIP可移植,操作系统特定的函数调用和数据结构不直接在协议的代码中使用.相反,当需要这样的函数调用和数据结构时,直接使用操作系统仿真层. 操作系统仿真层为操作系统服务提供统一的接口,如定时器, ...
- js篇-判断数组对象中是否含有某个值,并返回该条数据
项目背景需求是: 已知: var a=[{name:'jenny',age:18},{name:'john',age:19},{name:'jack',age:20}] var b ='jenny' ...
- C# Tuple<T1,T2....T>元组的使用
1) 先说组元:一个数据结构,由通过逗号分割的,用于传递给一个程序或者操作系统的一系列值的组合. NET Framework 直接支持一至七元素的元组 Tuple<T1> Tuple< ...
- Spring框架的第三天
## Spring框架的第三天 ## ---------- **课程回顾:Spring框架第二天** 1. IOC的注解方式 * @Value * @Resource(name="" ...
- 158A Next Round
A. Next Round time limit per test 3 seconds memory limit per test 256 megabytes input standard input ...
- vs2017添加引用出错:对COM组件的调用返回了错误HRESULT E_FAIL
1.以管理员身份打开 Developer Command Prompt for VS 2017(vs2017开发人员命令提示符) 2.定位到你的vs2017的安装目录 例:E:\Program Fil ...