ruby 在 OS X 10.6 上找不到 readline
我在 OS X 10.6 上运行 ruby 1.9.2,大多数情况都工作正常。但 readline 似乎不起作用,无论是在 IRB 还是在 Rails 控制台中。一些不同的帖子建议将 readline 构建为扩展,就像这样
cd <ruby-source-dir>/ext/readline
ruby extconf.rb
make
make install
所以我这样做了,这就是我得到的:
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
checking for editline/readline.h... yes
checking for readline() in -ledit... no
然后
make: Nothing to be done for `all'
这让我认为它没有找到我的 readline 安装。关于如何让它找到 readline 有什么想法吗?
I'm running ruby 1.9.2 on OS X 10.6, and mostly things are working fine. But readline doesn't seem to be working, either in IRB or in the rails console. A few different posts suggested building readline as an extension, like this
cd <ruby-source-dir>/ext/readline
ruby extconf.rb
make
make install
So I did that, and here's what I get:
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
checking for editline/readline.h... yes
checking for readline() in -ledit... no
and then
make: Nothing to be done for `all'
This makes me think it's not finding my readline install. Any ideas on how to get it to find readline?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我重新编译了 readline,然后再次尝试上述步骤,一切正常。我认为这可能是因为我最初是为 osx 10.5 编译 readline 的,当时 ruby 还是 32 位的。
I re-compiled readline and then tried the steps above again and everything worked fine. I think this may be because I had originally compiled readline for osx 10.5, when ruby was still 32 bits.