如何使用readline支持重新安装ruby? [英] How to reinstall ruby with readline support?

查看:190
本文介绍了如何使用readline支持重新安装ruby?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照 https://github.com/wayneeseguin/rvm#installation上的说明通过RVM安装了Ruby .

有关信息,我拥有所有档案( readline-5.2.tar.gz,readline-6.2.tar.gz,ruby-1.9.3-p327.tar.bz2,rubygems-1.8.24.tgz, ~/.rvm/archives目录中的wayneeseguin-rvm-stable.tgz和yaml-0.1.4.tar.gz ),我不想以任何方式重新下载它们.

For information I have all the archives (readline-5.2.tar.gz, readline-6.2.tar.gz, ruby-1.9.3-p327.tar.bz2, rubygems-1.8.24.tgz, wayneeseguin-rvm-stable.tgz and yaml-0.1.4.tar.gz) in ~/.rvm/archives directory and I don't want to re-download them in any way.

当我这样做时:

sudo /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config

我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
libtool is already the newest version.
sqlite3 is already the newest version.
libxslt1-dev is already the newest version.
libc6-dev is already the newest version.
openssl is already the newest version.
git-core is already the newest version.
subversion is already the newest version.
zlib1g is already the newest version.
libncurses5-dev is already the newest version.
curl is already the newest version.
libreadline6 is already the newest version.
libyaml-dev is already the newest version.
autoconf is already the newest version.
pkg-config is already the newest version.
libxml2-dev is already the newest version.
build-essential is already the newest version.
libssl-dev is already the newest version.
libreadline6-dev is already the newest version.
automake is already the newest version.
zlib1g-dev is already the newest version.
bison is already the newest version.
libsqlite3-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我什至做到了:

$ rvm pkg install readline
$ rvm reinstall 1.9.2 --with-readline-dir=$rvm_path/usr

但是我仍然可以在irb上找到它:

But I still get this on irb:

Readline was unable to be required, if you need completion or history install readline then reinstall the ruby. You may follow 'rvm notes' for dependencies and/or read the docs page https://rvm.io/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.

我已经完成了4-5次重新安装过程.

I have done re-installation process 4-5 times.

推荐答案

如果您已经安装了rvm requirements中的软件包,则最有可能在阅读行支持下安装红宝石.

Your ruby should be most likely installed with readline support if you had the packages from rvm requirements installed.

您可以通过运行以下命令来验证是否已安装readline:

You can verify that readline is installed by running:

rvm use 1.9.3
find $MY_RUBY_HOME -name readline.so | xargs ldd

根据我在响应中看到的内容,必须重复适当的流程:

From what I see in the responses a proper flow has to be repeated:

rm -rf $rvm_path/usr/
rvm get head
rvm remove 1.9.3
rvm install 1.9.3 --debug

如果仍然无法正常工作-请确保重复上述步骤,不要添加其他标志或开关,请确保从额外的编译标志中清除/etc/rvmrc~/.rvmrc.如果全部失败,则提供rvm install 1.9.3 --debug命令的输出.

If you still can not get it working - please make double sure you repeat the above steps, do not add additional flags or switches, make sure to clean up /etc/rvmrc and ~/.rvmrc from extra compilation flags. if it all fails provide output of the rvm install 1.9.3 --debug command.

这篇关于如何使用readline支持重新安装ruby?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆