我刚刚用homebrew安装了posgresql,当我继续输入命令时
psql
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
[1] 69711 trace trap psql
Run Code Online (Sandbox Code Playgroud)
有没有人知道什么是错的?
当我尝试运行时,rails console我收到此错误:
/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)
Run Code Online (Sandbox Code Playgroud)
快速搜索让我看到这篇文章,我尝试了一些事情:
brew reinstall postgresql (这确实是这个项目的数据库)
和
cd /usr/local/opt/readline/lib
ln libreadline.8.0.dylib libreadline.6.2.dylib
Run Code Online (Sandbox Code Playgroud)
(我的readline版本是8)
和
brew link readline --force
但这些都没有解决它.
我最近添加了pry-coolline,guard并且guard-livereloadgems到我的项目,如果这有任何区别(rails控制台在那之前加载好).我正在使用最新的macos.
(更新)我使用pry rails作为我的rails控制台,如果这有任何区别.
有帮助吗?谢谢.
我包括:
#include "stdio.h"
#include <readline/readline.h>
#include <readline/history.h>
Run Code Online (Sandbox Code Playgroud)
我的编译器包含标志
-lreadline
Run Code Online (Sandbox Code Playgroud)
但我仍然收到错误消息:
fatal error: 'readline/readline.h' file not found
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用readline();
这里更详细地定义:http://linux.die.net/man/3/readline
我正在开发一个rails应用程序.
使用postgresql-9.1.2-1-osx.dmg安装了Postgresql
安装了pg gem.
然后当我执行rake db:create
以下错误时 -
dlopen(/Users/sathishvc/.rvm/gems/ruby-1.9.3-head@knome-vivacious/gems/pg-0.12.2/lib/pg_ext.bundle,9):未加载库:/ usr/local/LIB/libpq.5.4.dylib
检查是否/usr/local/lib/libpq.5.4.dylib存在.它不是.
因此,它应该存在于系统中的其他位置,或者我不知道,如果我需要为此安装任何其他软件.
有人建议吗?
I have tried everything I can think of to get this to work, to no avail so here I am requesting suggestions on how to debug.
Firstly, runnning Ubuntu 11.10
Installed rvm:
$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Run Code Online (Sandbox Code Playgroud)
Installed readline using apt-get:
$ sudo apt-get install libreadline-dev
Run Code Online (Sandbox Code Playgroud)
Check for readline install:
$ dpkg --get-selections | grep readline
lib64readline-gplv2-dev install
lib64readline5 install
libreadline-dev install
libreadline5 install
libreadline6 install
libreadline6-dev install
readline-common install
Run Code Online (Sandbox Code Playgroud)
Install ruby, with readline support?
$ rvm install 1.9.2 …Run Code Online (Sandbox Code Playgroud) 这个问题是关于在导航命令历史记录时将R控制台配置为像bash shell一样.它与...有些相关?history.对于括号封闭的多行,我想将R的命令历史导航配置为类似于bash.
目前,当在Linux下在xterm中运行R时,使用向上箭头导航命令历史记录会导致每个前一行被逐一调用,即使一组行已被括在括号中.例如,当将多行函数从文本编辑器复制/粘贴到R控制台时,会发生这种情况.bash不是这样.以下是bash在这方面的功能如何:
在Linux下的xterm中的bash shell中,键入以下五行后...
a=1
{
x=1
y=1
}
Run Code Online (Sandbox Code Playgroud)
...向上箭头的第一次按下会回想起括号括起来的命令的单行重新编写,就像这样......
{ x=1; y=1; }
Run Code Online (Sandbox Code Playgroud)
......第二次报刊会回忆起这个......
a=1
Run Code Online (Sandbox Code Playgroud)
似乎在R中,向上箭头一次向后导航一行,而不管封装.有没有办法配置R,以便它的命令历史导航功能像bash的?
我已经安装了rvm和ruby 1.9.2,两者都正常工作.使用rvm版本1.10.2.我之前安装了rvm软件包readline/zlib,但现在我现在遇到了readline的大麻烦.我正在尝试在rvm中安装ruby 1.9.3,但我总是找不到readline.
我试着遵循不同的解决方案:
rvm remove 1.9.3
rvm pkg install readline
rvm install 1.9.3 --with-readline-dir=$rvm_path/usr/ \
--with-zlib-dir=$rvm_path/usr/
rvm use 1.9.3
rvmsudo gem install bundler
bundle install (all gems installed fine)
rails c / rails s
.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `require': \
cannot load such file -- readline (LoadError)
Run Code Online (Sandbox Code Playgroud)
我安装了libreadline-dev(版本6,当前版本)(这些软件包所需的一切)
我也尝试过以下方法:
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no …Run Code Online (Sandbox Code Playgroud) 我有一个运行Python 2.6.X的应用程序.以交互模式启动Python解释器(使用或不使用virtualenv):readline支持工作(命令历史记录).使用相同的Python解释器启动我的应用程序(virtualenv-ed或不使用):使用pdb.set_trace()时没有可用的readline支持:游标键不起作用.操作系统是Linux.
当我打开终端时,它显示如下错误消息.
dyld:未加载库:/usr/local/opt/readline/lib/libreadline.6.dylib引自:/ usr/local/bin/awk原因:未找到图像
我的电脑是mac os 10.11.6.
请帮帮忙?
yum我的系统显示已安装readline
rlwrap-0.41]$ sudo yum install readline
Loaded plugins: fastestmirror, presto, security
Loading mirror speeds from cached hostfile
.
.
.
Package readline-6.0-4.el6.x86_64 already installed and latest version
Nothing to do
Run Code Online (Sandbox Code Playgroud)
但是当我运行readline命令时,它不起作用
-bash: readline: command not found
Run Code Online (Sandbox Code Playgroud)
我认为命令二进制文件可能不在路径上所以尝试搜索它但没有运气.. !!
sudo find /usr/ -iname readline
Run Code Online (Sandbox Code Playgroud)
基本上我正在尝试安装http://freecode.com/projects/rlwrap/
,配置失败,说没有找到readline库.
libreadline ×10
readline ×5
rvm ×2
bash ×1
c ×1
centos ×1
console ×1
linux ×1
macos ×1
navigation ×1
pdb ×1
postgresql ×1
psql ×1
python ×1
r ×1
rlwrap ×1
ruby ×1
ruby-1.9.3 ×1
shell ×1
ubuntu ×1