您的位置:首页 > 数据库 > Oracle

Oracle Sqlplus中上下键出现^[[A乱码问题

2017-07-18 14:30 375 查看
安装rlwrap 环境准备:

下载:http://utopia.knoware.nl/~hlub/uck/rlwrap/ 或者 百度云盘:http://pan.baidu.com/s/1cnhO9S 需要先安装readline,否则会报一下错误:Youneed the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build thisprogram!如下: [root@17-150 ~]# cd /root[root@17-150 ~]# ll总用量 2295848-rw-------. 1 root root 1616 7月 11 16:07 anaconda-ks.cfg-rw-r--r--. 1 root root 1239269270 7月 14 09:35 linux.x64_11gR2_database_1of2.zip-rw-r--r--. 1 root root 1111416131 7月 14 09:36 linux.x64_11gR2_database_2of2.zipdrwxrwxr-x 8 500 500 4096 7月 18 10:38 rlwrap-0.37-rw-r--r-- 1 root root 251438 7月 18 10:37 rlwrap-0.37.tar.gz[root@17-150 ~]# tar zxf rlwrap-0.37.tar.gz [root@17-150 ~]# cd rlwrap-0.37[root@17-150 rlwrap-0.37]# lltotal 408-rw-rw-r-- 1 oracle dba 35029 Apr 30 2010 aclocal.m4-rw-r--r-- 1 oracle dba 638 Aug 15 2006 AUTHORS-rw-r--r-- 1 oracle dba 4267 May 5 2010 BUGS-rw-r--r-- 1 oracle dba 105 Aug 10 2003 ChangeLogdrwxrwxr-x 2 oracle dba 4096 May 5 2010 completions-rw-rw-r-- 1 oracle dba 7042 Apr 30 2010 config.h.in-rwxr-xr-x 1 oracle dba 222847 Apr 30 2010 configure-rw-r--r-- 1 oracle dba 11521 Apr 30 2010 configure.ac-rw-r--r-- 1 oracle dba 17992 Aug 8 2006 COPYINGdrwxrwxr-x 2 oracle dba 4096 May 5 2010 docdrwxrwxr-x 2 oracle dba 4096 May 5 2010 filters-rw-r--r-- 1 oracle dba 2019 Nov 23 2009 INSTALL-rw-r--r-- 1 oracle dba 1272 Jan 23 2010 Makefile.am-rw-rw-r-- 1 oracle dba 28316 Apr 30 2010 Makefile.in-rw-r--r-- 1 oracle dba 16788 Apr 30 2010 NEWS-rw-r--r-- 1 oracle dba 1394 Oct 24 2007 PLEA-rw-r--r-- 1 oracle dba 3070 Jan 8 2010 READMEdrwxrwxr-x 2 oracle dba 4096 May 5 2010 srcdrwxrwxr-x 2 oracle dba 4096 May 5 2010 test-rw-r--r-- 1 oracle dba 310 Apr 16 2010 TODOdrwxrwxr-x 2 oracle dba 4096 May 5 2010 tools[root@rtest rlwrap-0.37]# [root@rtest rlwrap-0.37]# ./configurechecking build system type...i686-pc-linux-gnuchecking host system type... i686-pc-linux-gnuchecking for a BSD-compatible install.../usr/bin/install -c.......................................checking for tgetent... nochecking for tgetent in -lcurses... nochecking for tgetent in -lncurses... nochecking for tgetent in -ltermcap... noconfigure: WARNING: No termcap nor curseslibrary foundchecking for readline in -lreadline... noconfigure: error: You need the GNU readlinelibrary(ftp://ftp.gnu.org/gnu/readline/ ) to buildthis program!提示错误:configure: error: You need the GNU readlinelibrary(ftp://ftp.gnu.org/gnu/readline/ ) to buildthis program!接下来,我们安装依赖包 1.安装readline[root@17-150 ~]#yum install readline-devel readline 2.安装rlwrap [root@17-150 ~]# tar zxf rlwrap-0.37.tar.gz [root@17-150 ~]# cd rlwrap-0.37[root@17-150 rlwrap-0.37]# ll总用量 384-rw-rw-r-- 1 500 500 35029 4月 30 2010aclocal.m4-rw-r--r-- 1 500 500 638 8月 15 2006AUTHORS-rw-r--r-- 1 500 500 4267 5月 5 2010BUGS-rw-r--r-- 1 500 500 105 8月 10 2003ChangeLogdrwxrwxr-x 2 500 500 38 5月 5 2010completions-rw-rw-r-- 1 500 500 7042 4月 30 2010config.h.in-rwxr-xr-x 1 500 500 222847 4月 30 2010 configure-rw-r--r-- 1 500 500 11521 4月 30 2010configure.ac-rw-r--r-- 1 500 500 17992 8月 8 2006COPYINGdrwxrwxr-x 2 500 500 65 5月 5 2010docdrwxrwxr-x 2 500 500 4096 5月 5 2010filters-rw-r--r-- 1 500 500 2019 11月 23 2009 INSTALL-rw-r--r-- 1 500 500 1272 1月 23 2010Makefile.am-rw-rw-r-- 1 500 500 28316 4月 30 2010Makefile.in-rw-r--r-- 1 500 500 16788 4月 30 2010NEWS-rw-r--r-- 1 500 500 1394 10月 24 2007 PLEA-rw-r--r-- 1 500 500 3070 1月 8 2010READMEdrwxrwxr-x 2 500 500 308 5月 5 2010srcdrwxrwxr-x 2 500 500 38 5月 5 2010test-rw-r--r-- 1 500 500 310 4月 16 2010TODOdrwxrwxr-x 2 500 500 92 5月 5 2010 tools [root@rtest rlwrap-0.37]# ./configure checking build system type...x86_64-unknown-linux-gnuchecking host system type...x86_64-unknown-linux-gnuchecking for a BSD-compatible install.../usr/bin/install -cchecking whether build environment is sane...yeschecking for a thread-safe mkdir -p.../usr/bin/mkdir -p.......................................config.status: creating doc/Makefileconfig.status: creating src/Makefileconfig.status: creating doc/rlwrap.manconfig.status: creating config.hconfig.status: executing depfiles commands Now do: make(or gmake) to build rlwrap makecheck for instructions how to testit makeinstall to install it [root@rtest rlwrap-0.37]# [root@rtest rlwrap-0.37]# makemake all-recursivemake[1]: Entering directory `/opt/rlwrap-0.37'Making all in docmake[2]: Entering directory`/opt/rlwrap-0.37/filters'make[2]: Nothing to be done for `all'.make[2]: Leaving directory`/opt/rlwrap-0.37/filters'.....................................make[2]: Entering directory `/opt/rlwrap-0.37'make[2]: Nothing to be done for `all-am'.make[2]: Leaving directory `/opt/rlwrap-0.37'make[1]: Leaving directory `/opt/rlwrap-0.37' [root@rtest rlwrap-0.37]# make installMaking install in docmake[1]: Entering directory`/opt/rlwrap-0.37/doc'make[2]: Entering directory`/opt/rlwrap-0.37/doc'................................................make[3]: Entering directory `/opt/rlwrap-0.37'chmod a+x /usr/local/share/rlwrap/filters/* make[3]: Leaving directory `/opt/rlwrap-0.37'make[2]: Leaving directory `/opt/rlwrap-0.37'make[1]: Leaving directory `/opt/rlwrap-0.37'编译配置文件[root@rtest rlwrap-0.37]# vi/home/oracle/.bash_profile# .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi # User specific environment and startupprograms export ORACLE_BASE=/u01/app/oracleexportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1export ORACLE_SID=TEST0422exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport PATH=$ORACLE_HOME/bin:$PATH PATH=$PATH:$HOME/bin export PATH stty erase ^Haliassqlplus='rlwrap sqlplus'aliasrman='rlwrap rman' #添加如下内容aliassqlplus='rlwrap sqlplus'aliasrman='rlwrap rman' "/home/oracle/.bash_profile" 25L,455C written 保存退出,使文件立即生效。[root@17-150 rlwrap-0.37]# source/home/oracle/.bash_profile
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle 上下键乱码