更新:我可能搞砸了我的系統,同時嘗試在其他地方找到解決方案。我從頭開始,Ruby 1.9.3安裝順利。我們試圖讓REE-1.8.7發揮好一起...爲什麼試圖啓動rails控制檯時會出現Readline錯誤?
我試圖使用上的Kubuntu RVM(11.10我相信)安裝Ruby 1.9.3。到目前爲止,我一直對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/[email protected]/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `require'
from /home/mbillard/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/mbillard/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands.rb:38:in `require'
from /home/mbillard/.rvm/gems/[email protected]/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"
並使用$rvm_path
編譯Readline時導致出現此錯誤:
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
所以,感謝您提供的任何幫助。
不是你確切的錯誤,但也許是這個問題的答案會有幫助嗎? http://stackoverflow.com/questions/7760511/mongodb-on-ubuntu – Brian 2012-02-14 01:07:55
@布萊恩謝謝,但它沒有工作 – mbillard 2012-02-14 01:21:45
我也有同樣的問題 – raymondralibi 2012-02-14 04:12:52