解决backspace出现乱码问题

在linux上使用rlwrap工具实现oracle sqlplus上下键翻页查看功能:
首先需要安装readline安装包,光盘里提供了这个包,而readline-devel包依赖于libtermcap-devel包,如果未安装readline包
安装最后会导致如下错误:
configure: checking for pty ranges...
checking for tgetent... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error:

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

解决办法:
[root@admin rlwrap-0.37]# yum install readline-devel*

安装rlwrap工具步骤:
一、巧妇难为无米之炊,首先得下载rlwrap
http://utopia.knoware.nl/~hlub/uck/rlwrap/ 
二、安装
[root@admin tmp]# tar xvfz rlwrap-0.37.tar.gz
[root@admin tmp]# cd rlwrap-0.37
[root@admin rlwrap-0.37]# ./configure && make && make install
三、英雄要有用武之地,包二奶不是为了显摆,要让它物尽其用,为已造福.
[oracle@admin ~]$ vim .bashrc 增加以下两行,如果需要用到rman备份可以事前给rman也造造福.
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'


你可能感兴趣的:(oracle上下键乱码)