没有要加载的文件 - readline [英] no such file to load -- readline
问题描述
我收到以下错误:
$script/console
Loading development environment (Rails 2.2.2)
/opt/ruby-enterprise-1.8.6-20080709/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
我可以从哪里获取文件以及它应该放在哪个目录中?
Where can i get the file and what directory should it go in?
谢谢!
推荐答案
readline 模块通常是 Ruby 包本身的一部分.
The readline module is normally part of the Ruby package itself.
您是否手动构建了 Ruby 安装?如果是这样,您需要确保安装了 libreadline 及其标头,然后重新构建.
Did you manually build your Ruby install? If so, you want to make sure libreadline and its headers are installed, and build again.
在 Debian/Ubuntu 上:
On Debian/Ubuntu:
apt-get install libreadline-dev
或者在 RHEL/CentOS 上试试
Or on RHEL/CentOS, try
yum install readline-devel
更新:
您使用的是非常旧的 Ubuntu 版本.如果您想继续使用它,请在文本编辑器中打开 /etc/apt/sources.list
,并将所有出现的 archive.ubuntu.com
更改为 old-releases.ubuntu.com
.然后,运行 apt-get update
并再次尝试上述操作.
You are using a very old release of Ubuntu. If you want to keep using it, open /etc/apt/sources.list
in a text editor, and change all occurrences of archive.ubuntu.com
to old-releases.ubuntu.com
. Then, run apt-get update
and try the above again.
不过,我敦促您考虑更新您的安装.Ubuntu 7.10 已经有一段时间没有看到安全更新了,不建议在生产中使用它.即使它不是生产机器,由于某些库/依赖项的旧版本,您很有可能会遇到更多问题.
I urge you to consider updating your installation, though. Ubuntu 7.10 hasn't seen security updates in quite a while, and using it in production is not recommended. Even if it's not a production machine, there's a good chance you'll run into further problems because of old versions of certain libraries/dependencies.
这篇关于没有要加载的文件 - readline的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!