更新:我可能在尝试在其他地方找到的解决方案时弄乱了我的系统。我从头开始,顺利安装了 Ruby 1.9.3。现在试着让 ree-1.8.7 和它一起玩得很好......
我正在尝试在 Kubuntu 上使用 RVM 安装 Ruby 1.9.3(我相信是 11.10)。到目前为止,我在 Readline 上遇到了很多问题,但找到了除此之外的所有问题的答案。
我以这种方式安装了 Ruby 1.9.3:
rvm install 1.9.3
# Install of ruby-1.9.3-p0 - #complete
cd ~/.rvm/src/ruby-1.9.3-p0/ext/readline/
~/.rvm/src/ruby-1.9.3-p0/ext/readline $ ../../ruby extconf.rb --with-editline-dir="/usr" --with-readline-dir="/usr"
# any other way of doing this resulted in simply readline not being loaded when trying to start the console
# I have libreadline6 and libreadline6-dev installed (and all the packages requested in `rvm requirements`
make install
# compiling readline.c
# linking shared-object readline.so
# /usr/bin/install -c -m 0755 readline.so /home/mbillard/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/x86_64-linux
# installing default readline libraries
到目前为止,一切看起来都运行正常,但是当我尝试启动控制台时,我收到了这个错误:
/home/mbillard/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `require': /home/mbillard/.rvm/usr/lib/libreadline.so.6: undefined symbol: UP - /home/mbillard/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/x86_64-linux/readline.so (LoadError)
from /home/mbillard/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
from /home/mbillard/.rvm/gems/ruby-1.9.3-p0@taskman/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `require'
from /home/mbillard/.rvm/gems/ruby-1.9.3-p0@taskman/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/mbillard/.rvm/gems/ruby-1.9.3-p0@taskman/gems/railties-3.2.1/lib/rails/commands.rb:38:in `require'
from /home/mbillard/.rvm/gems/ruby-1.9.3-p0@taskman/gems/railties-3.2.1/lib/rails/commands.rb:38:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
我在上面的命令中编译 Readline 时尝试使用rvm install 1.9.3 --with-readline-dir="$rvm_path/usr"
和使用$rvm_path
,但是导致了这个错误:
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... no
所以,感谢您提供的任何帮助。