Ruby升级后no such file to load -- readline解决办法
升级ruby和rails后进入script/consle出现:
代码如下:
/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
解决办法:
第一步:确认是否安装了libncurses5-dev libreadline5-dev ,如果没有安装,就用
代码如下:
sudo apt-get install libncurses5-dev libreadline5-dev 进行安装
第二步:
代码如下:
cd /usr/src/ruby-1.8.7/ext/readline ruby extconf.rb make sudo make install
相关推荐
PMJ0 2020-10-13
longzhiwen 2020-09-06
yangxingstar 2020-08-31
LUCIEN0 2020-08-17
huangzihao00 2020-08-17
Jan 2020-08-17
AndesStay 2020-06-12
afengxg 2020-06-09
zamesking 2020-06-09
afengxg 2020-06-09
何志文 2020-06-09
teresalxm 2020-06-05
何志文 2020-05-16
何志文 2020-05-11
fsl 2020-05-04
JOO 2020-04-26
倩 2020-04-22
afanti 2020-04-19
始终不够 2020-04-10