[url=http://nishizhen.cn/archives/2007/10/14/214.html]原文,我的blog[/url]
昨天晚上启动script/console
然后提示我:
[code]
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/1.8/irb/completion.rb:10
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
from /usr/local/bin/irb:13
[/code]
然后上网查,找到说要安装libncurses5-dev libreadline5-dev
然后安装发现我已经有了这两个库,然后进入ruby的目录发现有个目录i486-linux下面有readline.so
然后又搜到一位[url=http://tw.myblog.yahoo.com/weijenlu/article?mid=40&prev=41&next=39]台湾大哥[/url]:
[quote]
都是升級惹的禍III
分類:Rails
2007/03/26 19:29
OS: fedora core 5
Ruby是1.8.6
Rails 是1.2.3
今天又要開始寫程式了,結果嚇然發現,我的script/console竟然不會動了,升級前都好好的呀。
它秀出錯誤訊息:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/1.8/irb/completion.rb:10
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
from /usr/local/bin/irb:13
還好Google 幫我找到解決方法了,有Google真好。
主要的問題出在readline.so這個檔案,也不知道是那裡的問題,解決方法是下這個指令:
cp /usr/lib/ruby/1.8/i386-linux/readline.so /usr/local/lib/ruby/1.8/i686-linux/readline.so
這樣就解決了,如果看官知道是怎麼回事,請告訴我一下,謝謝。
[/quote]
我发现我和他的问题可能一样,继续搜索,感觉是这样,应该先安装readline然后在编译和安装ruby
找到[url=http://www.carmelyne.com/2007/7/17/compiling-ruby-1-8-6-on-ubuntu]这个[/url]:
[quote]
Compiling Ruby 1.8.6 on Ubuntu
July 17, 2007 @ 09:26 AM | posted by carmelyne
(last updated: 08.09.07)
Lets do this quickly:
Note: This is not for an upgrade.
1. cd /usr/src
2. sudo wget http://rubyforge.org/frs/download.php/18421/ruby-1.8.6.tar.gz
3. sudo tar -xvf ruby-1.8.6.tar.gz
4. cd ruby-1.8.6
5. sudo apt-get install build-essential
6. ./configure
7. make test
8. make
9. sudo make install
10. ruby -v (# == ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux])
11. irb (# make sure irb works)
Then just do a quick update sweep for ubuntu:
1. apt-get update
2. apt-get dist-upgrade
UPDATE: Getting script/console to work
Error:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’: no such file to load – readline (LoadError)
Eeek now script/console won't work. So let's fix that. We'll go back to the archive and do the following:
1. cd /usr/src/ruby-1.8.6/ext/readline
2. ruby extconf.rb
3. make
4. sudo make install
Do I need a disclaimer? Hey! I was on my own too when I did this compile. ;p
[/quote]
知道我用源码还是可以重新搞定这个局部升级的问题的~
昨天晚上启动script/console
然后提示我:
[code]
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/1.8/irb/completion.rb:10
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
from /usr/local/bin/irb:13
[/code]
然后上网查,找到说要安装libncurses5-dev libreadline5-dev
然后安装发现我已经有了这两个库,然后进入ruby的目录发现有个目录i486-linux下面有readline.so
然后又搜到一位[url=http://tw.myblog.yahoo.com/weijenlu/article?mid=40&prev=41&next=39]台湾大哥[/url]:
[quote]
都是升級惹的禍III
分類:Rails
2007/03/26 19:29
OS: fedora core 5
Ruby是1.8.6
Rails 是1.2.3
今天又要開始寫程式了,結果嚇然發現,我的script/console竟然不會動了,升級前都好好的呀。
它秀出錯誤訊息:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/1.8/irb/completion.rb:10
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
from /usr/local/bin/irb:13
還好Google 幫我找到解決方法了,有Google真好。
主要的問題出在readline.so這個檔案,也不知道是那裡的問題,解決方法是下這個指令:
cp /usr/lib/ruby/1.8/i386-linux/readline.so /usr/local/lib/ruby/1.8/i686-linux/readline.so
這樣就解決了,如果看官知道是怎麼回事,請告訴我一下,謝謝。
[/quote]
我发现我和他的问题可能一样,继续搜索,感觉是这样,应该先安装readline然后在编译和安装ruby
找到[url=http://www.carmelyne.com/2007/7/17/compiling-ruby-1-8-6-on-ubuntu]这个[/url]:
[quote]
Compiling Ruby 1.8.6 on Ubuntu
July 17, 2007 @ 09:26 AM | posted by carmelyne
(last updated: 08.09.07)
Lets do this quickly:
Note: This is not for an upgrade.
1. cd /usr/src
2. sudo wget http://rubyforge.org/frs/download.php/18421/ruby-1.8.6.tar.gz
3. sudo tar -xvf ruby-1.8.6.tar.gz
4. cd ruby-1.8.6
5. sudo apt-get install build-essential
6. ./configure
7. make test
8. make
9. sudo make install
10. ruby -v (# == ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux])
11. irb (# make sure irb works)
Then just do a quick update sweep for ubuntu:
1. apt-get update
2. apt-get dist-upgrade
UPDATE: Getting script/console to work
Error:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’: no such file to load – readline (LoadError)
Eeek now script/console won't work. So let's fix that. We'll go back to the archive and do the following:
1. cd /usr/src/ruby-1.8.6/ext/readline
2. ruby extconf.rb
3. make
4. sudo make install
Do I need a disclaimer? Hey! I was on my own too when I did this compile. ;p
[/quote]
知道我用源码还是可以重新搞定这个局部升级的问题的~