LINUX下oracle中SQLPLUS时上下左右键乱码问题
2017-01-24 15:09
375 查看
window下的sqlplus可以通过箭头键,来回看历史命令,用起来非常的方便。
但是在linux下,会出现各种乱码,非常不方便,如下图所示,每次打错一个字符就需要重新打一遍。
解决办法:rlwrap 可以用来支持Oracle下sqlplus历史命令的回调功能,提高效率。
解决过程:
1、首先下载rlwrap和readline;
readline-6.3.tar.gz
rlwrap-0.30.tar.gz
2、安装readline包
tar -zxvf readline-6.3.tar.gz
cd readline-6.3
./configure
make
make install
3、安装rlwrap
tar -zxvf rlwrap-0.30.tar.gz
cd rlwrap-0.30
./configure
出现问题:You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program!
解决办法:yum install readline*,执行后出现如下问题
Error Downloading Packages:
readline-static-6.0-4.el6.x86_64: failure: Packages/readline-static-6.0-4.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-libs-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-libs-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
readline-devel-6.0-4.el6.x86_64: failure: Packages/readline-devel-6.0-4.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-devel-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-devel-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-base-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-base-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
如果这些包安装失败,可以到官网上找这些包下载独立安装,安装无误后,在一次尝试:
可以从这个网址进行下载
,包很全: http://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/ (需要翻墙)
安装下载的依赖包:
rpm -ivh --force readline-static-6.0-4.el6.x86_64.rpm
ncurses-libs-5.7-4.20090207.el6.x86_64.rpm readline-devel-6.0-4.el6.x86_64.rpm
ncurses-devel-5.7-4.20090207.el6.x86_64.rpm ncurses-base-5.7-4.20090207.el6.x86_64.rpm
然后再尝试安装rlwrap:
./configure
使用方法:
1、首先配置一些信息,在oracle用户下的.bash_profile中添加以下信息:
alias sqlplus='/usr/local/rlwrap/bin/rlwrap sqlplus' (添加命令)
alias sqlplus='rlwrap sqlplus' (去除每次都需要输入rlwrap的麻烦)
alias rman='rlwrap rman'
2、source .bash_profile 后就可以使用了
但是在linux下,会出现各种乱码,非常不方便,如下图所示,每次打错一个字符就需要重新打一遍。
解决办法:rlwrap 可以用来支持Oracle下sqlplus历史命令的回调功能,提高效率。
解决过程:
1、首先下载rlwrap和readline;
readline-6.3.tar.gz
rlwrap-0.30.tar.gz
2、安装readline包
tar -zxvf readline-6.3.tar.gz
cd readline-6.3
./configure
make
make install
3、安装rlwrap
tar -zxvf rlwrap-0.30.tar.gz
cd rlwrap-0.30
./configure
出现问题:You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program!
解决办法:yum install readline*,执行后出现如下问题
Error Downloading Packages:
readline-static-6.0-4.el6.x86_64: failure: Packages/readline-static-6.0-4.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-libs-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-libs-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
readline-devel-6.0-4.el6.x86_64: failure: Packages/readline-devel-6.0-4.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-devel-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-devel-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
ncurses-base-5.7-4.20090207.el6.x86_64: failure: Packages/ncurses-base-5.7-4.20090207.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
如果这些包安装失败,可以到官网上找这些包下载独立安装,安装无误后,在一次尝试:
可以从这个网址进行下载
,包很全: http://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/ (需要翻墙)
安装下载的依赖包:
rpm -ivh --force readline-static-6.0-4.el6.x86_64.rpm
ncurses-libs-5.7-4.20090207.el6.x86_64.rpm readline-devel-6.0-4.el6.x86_64.rpm
ncurses-devel-5.7-4.20090207.el6.x86_64.rpm ncurses-base-5.7-4.20090207.el6.x86_64.rpm
然后再尝试安装rlwrap:
./configure
make
make install
使用方法:
1、首先配置一些信息,在oracle用户下的.bash_profile中添加以下信息:
alias sqlplus='/usr/local/rlwrap/bin/rlwrap sqlplus' (添加命令)
alias sqlplus='rlwrap sqlplus' (去除每次都需要输入rlwrap的麻烦)
alias rman='rlwrap rman'
2、source .bash_profile 后就可以使用了
相关文章推荐
- Linux下Oracle中SqlPlus时上下左右键乱码问题的解决办法
- Linux下Oracle中SqlPlus时上下左右键乱码问题的解决办法
- 解决LINUX下SQLPLUS时上下左右键乱码问题
- Oracle Sqlplus中上下键出现^[[A乱码问题
- Oracle Sqlplus中上下键出现^[[A乱码问题
- Oracle Sqlplus中上下键出现^[[A乱码问题
- linux下使用oracle无法使用上下左右光标键
- linux oracle 解决sqlplus光标不可用问题
- Linux下ORACLE乱码问题解决方法
- Linux环境下Oracle Sqlplus中使用上下键调用SQL语句的方法
- Linux Oracle 10g sqlplus 中文提示是乱码
- Linux中oracle是如何解决backspace和上下键使用出现乱码
- Vi乱码/上下左右 backspace不能使用的问题
- Redhat enterprise linux下安装rlwrap工具 解决Sqlplus 在Linux 下光标乱码的问题
- 解决Linux下oracle乱码问题
- 在 Linux中oracle中如何使用rlwrap解决上下键使用出现乱码
- LINUX和pl/sql development上ORACLE显示乱码问题
- linux oracle中文乱码问题解决方法
- linux下oracle EM中文乱码问题解决