问题处理: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 ...
随机推荐
- redis3.0.3集群搭建
redis3.0版本之后支持Cluster,具体介绍redis集群我就不多说,了解请看redis中文简介. 首先,直接访问redis.io官网,下载redis.tar.gz,现在版本3.0.3,我下面 ...
- 使用spring data solr 实现搜索关键字高亮显示
后端实现: @Service public class ItemSearchServiceImpl implements ItemSearchService { @Autowired private ...
- Java 动态代理详解
package com.at221; //代理设计模式: interface ClothFactory{ void product(); } class NikeFactory implements ...
- C++对象赋值问题
- Intellij IDEA junit 使用之org.junit不存在
在IDEA里面已经新建好了一个类,并加入了内容,然后创建测试类,快捷键(Ctrl+Alt+T)或者如图右键 Goto Test 创建后运行报错: Error:(3, 24) java: 程序包org. ...
- java并发之线程间通信
1.volatile 关键字 java 支持多个线程同时访问一个对象或对象的成员变量,而每个线程拥有这个变量的拷贝,虽然对象或成员变量分配的内存在共享内存,但每个执行的线程可以拥有一份拷贝,可以提高程 ...
- php 从一个数组中随机获取固定数据
<?php /* * * 通过一个标识,从一个数组中随机获取固定数据 * $arr 数组 * $num 获取的数量 * $time 随机固定标识值,一般用固定时间或者某个固定整型 * */ fu ...
- Docker Kubernetes 介绍 or 工作原理
Kubernetes 介绍 Kubernetes是Google在2014年6月开源的一个容器集群管理系统,使用Go语言开发,Kubernetes也叫K8S. K8S是Google内部一个叫Borg的容 ...
- Docker Kubernetes 创建管理 Pod
Docker Kubernetes 容器扩容与缩容 环境: 系统:Centos 7.4 x64 Docker版本:18.09.0 Kubernetes版本:v1.8 管理节点:192.168.1.79 ...
- 【HBase调优】Hbase万亿级存储性能优化总结
背景:HBase主集群在生产环境已稳定运行有1年半时间,最大的单表region数已达7200多个,每天新增入库量就有百亿条,对HBase的认识经历了懵懂到熟的过程.为了应对业务数据的压力,HBase入 ...