解決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:linux

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

解決辦法:
[root@admin rlwrap-0.37]# yum install readline-devel*vim

安裝rlwrap工具步驟:
1、巧婦難爲無米之炊,首先得下載rlwrap
http://utopia.knoware.nl/~hlub/uck/rlwrap/ 
2、安裝
[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
3、英雄要有用武之地,包二奶不是爲了顯擺,要讓它物盡其用,爲已造福.
[oracle@admin ~]$ vim .bashrc 增長如下兩行,若是須要用到rman備份能夠事前給rman也造造福.
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'bash

相關文章
相關標籤/搜索