问题处理: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 ...
随机推荐
- python-----编写接口,使用postman与soapiu与jemeter访问调用
实例:自己写一个注册接口 输入用户名.密码.验证码,当满足注册将密码进行md5加密. 场景 接口返回参数 提示 用户名存在 2000 exit 用户已存在 密码与验证码不相等 3000 wrong 密 ...
- MySQL常用运算符:算术运算符、比较运算符、逻辑运算符
(一) 算术运算符 注意: 在除法运算和模运算中,如果除数为0,将是非法除数,返回结果为NULL. div运算符主要是求两个数相除的商 (二) 比较运算符:比较运算符的运算结果为1(条件为真),0 ...
- linux之sed的使用
基本介绍 sed是stream editor的缩写,一种流编辑器,它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲 ...
- vue 之 筛选功能实现
要实现的效果如下:根据输入框里面输入的内容筛选下面列表: 推荐实现代码如下:其中 allProductData 就是用来下拉列表的数据,allProductList 为从获取的所有列表的数据:
- java框架之Spring(3)-JDBC模板使用&事务管理
下面内容使用到的 jar 包下载 JDBC模板使用 入门 1.导包,如要导入 Spring 的基本开发包.数据库驱动包.Spring 提供的 JDBC 模板包,如下: 2.测试: @Test publ ...
- Number 强制类型转换 int 强制转换整型 float 强制转换浮点型 complex 强制转换成复数 bool 强制转换成布尔类型,结果只有两种,要么True 要么 False """bool 可以转换所有的数据类型 everything"""
# ###Number 强制类型转换 var1 = 5 var2 = 4.85 var3 = True var3_2 = False var4 = 3+9j var5 = "888777&q ...
- 【Go语言】基本的语法
昨天花了几个小时的时间把Go的语法过了一遍,发现Go语言的语法核心和大部分编程语言的规则还是挺相近的,差别的就是不同的书写规范.还有就是前天安装VScode编译器那个插件把人弄得恶心了,总是安装不成功 ...
- Sysinternals Utilities
https://docs.microsoft.com/zh-cn/sysinternals/ Sysinternals 之前为Winternals公司提供的免费工具,Winternals原本是一间主力 ...
- Python中if __name__ == '__main__',__init__和self 的解析
1.2.1 一个.py文件被其他.py文件引用 假设我们有一个const.py文件,内容如下: 现在,我们写一个用于计算圆面积的area.py文件,area.py文件需要用到const.py文件中的P ...
- 为VisualStudio2017添加bits/stdc++.h
在算法编程中经常有人只写一个头文件"bits/stdc++.h" 其实这个是很多头文件的集合,写了它后相当于包含了所有常用的C++头文件,可是需要注意的是并不是所有的OJ系统都支持 ...