我正在尝试使用RVM在Kubuntu上安装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>'
我尝试使用rvm install 1.9.3 –with-readline-dir =“$rvm_path / usr”并在上面的命令中编译Readline时使用$rvm_path,但是这些导致了这个错误:
checking for tgetnum() in -lncurses... yeschecking for readline/readline.h... yeschecking for readline/history.h... yeschecking for readline() in -lreadline... nochecking for readline() in -ledit... nochecking for editline/readline.h... no
所以,感谢您提供的任何帮助.
解决方法 请阅读输出:rvm requirements
它将显示您需要安装的库列表以充分利用Ruby
安装完所有库后,清理rvm安装的库并重新安装Ruby:
rm -rf $rvm_path/usrrvm reinstall 1.9.3总结
以上是内存溢出为你收集整理的ruby – 尝试启动rails控制台时为什么会出现Readline错误?全部内容,希望文章能够帮你解决ruby – 尝试启动rails控制台时为什么会出现Readline错误?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)