使用xshell等客户端登录oracl时在命令行无法使用退格键也无法使用上下键切换历史命令可以使用rlwrap解决

1,linux环境

Oracle在linux下命令行无法使用退格键退格,无法使用上下键切换历史命令的解决办法

2,下载rlwrap

wget https://files.cnblogs.com/files/killkill/rlwrap-0.30.tar.gz.zip

3,解压安装

tar -xf rlwrap-0.30.tar.gz.zip

cd rlwrap-0.30

./configure

make

make install

4,设置环境变量

vim /home/oracle/.bash_profile

在尾部添加

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

设置生效

source /home/oracle/.bash_profile

完美解决问题

 

PS:在configure出现错误 You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

解决办法:yum -y install readline*  一定要加*号

 

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2021-09-04
  • 2021-07-12
  • 2021-09-16
  • 2022-12-23
  • 2021-12-22
  • 2021-12-28
猜你喜欢
  • 2021-07-14
  • 2021-08-04
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-10-12
  • 2022-01-11
相关资源
相似解决方案