ruby – readline不工作在rvm – Ubuntu 11.10

前端之家收集整理的这篇文章主要介绍了ruby – readline不工作在rvm – Ubuntu 11.10前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的ubropu 11.10上使用rvm.我的readline不工作,我尝试 ruby extconf.rb但它没有通过.输出如下:
  1. $ruby extconf.rb
  2. checking for tgetnum() in -lncurses... yes
  3. checking for readline/readline.h... yes
  4. checking for readline/history.h... yes
  5. checking for readline() in -lreadline... no
  6. checking for readline() in -ledit... no
  7. checking for editline/readline.h... no

我试过安装libncurses5-dev&中的libreadline5-dev的

  1. $sudo apt-get install libncurses5-dev libreadline5-dev
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. Package libreadline5-dev is not available,but is referred to by another package.
  6. This may mean that the package is missing,has been obsoleted,or
  7. is only available from another source
  8. However the following packages replace it:
  9. libreadline-gplv2-dev:i386 lib64readline-gplv2-dev:i386 libreadline-gplv2-dev
  10.  
  11. E: Package 'libreadline5-dev' has no installation candidate

这里有什么问题?谁能帮忙?

解决方法

同样的问题在这里 Readline errors prevent me running rails console

在ubuntu下,您可以使用系统readline安装.

  1. rvm uninstall ${YOURUBYVERSION}
  2. sudo apt-get install libreadline-dev
  3. rvm install ${YOURUBYVERSION} --with-readline-dir=/usr/include/readline

用您所需的红宝石版本代替${YOURUBYVERSION}.

猜你在找的Ruby相关文章