【Linux】Linux环境下Oracle SqlPlus中方向键问题的解决方法

 问题描述:Linux系统安装好Oracle之后,在使用Sqlplus时发现,不能正常使用上下左右方向键及退格键了,仅在屏幕上显示^[[A^[[B^[[C^[[D

解决方法:需要安装一个rlwrap包。 rlwrap是一个基于GNU readline library的工具,可以增强Linux中的Sqlplus命令行功能,
能够使一些普通的命令行(比如Oracle中的Sqlplus、Rman等)具有历史输入回溯和错误回退修正的增强功能。
下载完rpm安装包后,以root用户进行安装。

1、下载地址:(For  CentOS7)
http://rpm.pbone.net/index.php3/stat/4/idpl/30448081/dir/centos_7/com/rlwrap-0.42-1.1.x86_64.rpm.html

选择其他适合版本:
http://rpm.pbone.net/index.php3?stat=3&search=rlwrap&srodzaj=3

基本信息如下:
rlwrap rpm build for : CentOS 7

Name : rlwrap-0.42-1.1.x86_64.rpm
Version : 0.42 Vendor : obs://build_opensuse_org/home:Ledest:misc
Release : 1.1 Date : 2015-01-11 17:25:51
Group : Productivity/Other Source RPM : rlwrap-0.42-1.1.src.rpm
Size : 0.17 MB
Packager : (none)
Summary : A Readline Wrapper
Description : 
rlwrap uses the GNU readline library to allow the editing of keyboard input for
any other command. The input history is remembered across invocations, separately
for each command;history completion and search work as in bash and completion
word lists can be specified on the command line.

RPM found in directory: /mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Ledest:/misc/CentOS_7/x86_64

Content of RPM  Changelog  Provides Requires
Download 
ftp.gwdg.de rlwrap-0.42-1.1.x86_64.rpm
ftp.pbone.net rlwrap-0.42-1.1.x86_64.rpm

2、以root用户进行安装
此RPM 包 可以直接安装,不需要其他依赖包。



3、使用方法

rlwrap sqlplus

也可将其添加到别名中  
编辑oracle用户下的.bash_profile
增加以下两行:

alias sqlplus=’rlwrap sqlplus’
alias rman=’rlwrap rman’

保存退出后执行以下命令立即启用即可。  
.  .bash_profile

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/618091/viewspace-2123847/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/618091/viewspace-2123847/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值