Linux 环境下安装rlwrap工具

摘要:
收割台V3RSA/SHA256签名:转储程序)需要通过lwrap-0.43-2.el7.x86_64[root@oracle~]#yuminstallperlLoadedplugins:langpacksLoadingmirrorspeedsfromcachedhostfileResolvingDependencies-&gt:

rlwrap项目是一个“readline包装器”,它使用GNU readline库来编辑任何其他命令的键

盘输入。通过rlwrap可以进行命令的上下切换,类似历史命令。

1、下载rlwrap rpm

rlwrap rpm包可以通过:https://centos.pkgs.org/  获取
 
安装这个包可以解决下面截图问题
Linux 环境下安装rlwrap工具第1张
rlwrap能解决方向键上下切换历史执行的sql,左右方向键乱码的问题可以通过shell终端解决,比如xshell方法如下:
Linux 环境下安装rlwrap工具第2张


 2、安装rlwrap

[root@oracle ~]# rpm -ivh rlwrap-0.43-2.el7.x86_64.rpm 
warning: rlwrap-0.43-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
error: Failed dependencies:
    /usr/bin/python3.6 is needed by rlwrap-0.43-2.el7.x86_64
    perl(Data::Dumper) is needed by rlwrap-0.43-2.el7.x86_64
[root@oracle ~]# yum install perl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package 4:perl-5.16.3-291.el7.x86_64 already installed and latest version
Nothing to do

centos7对应的是0.43版本,但是安装时提示需要py3.6和perl两个依赖包,perl已经安装,py版本是2.7

先解决perl问题:

[root@oracle ~]# yum -y install autoconf
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Data::Dumper) for package: autoconf-2.69-11.el7.noarch
--> Running transaction check
---> Package m4.x86_64 0:1.4.16-10.el7 will be installed
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================
 Package                                          Arch                                   Version                                        Repository                                     Size
============================================================================================================================================================================================
Installing:
 autoconf                                         noarch                                 2.69-11.el7                                    centos-source                                 701 k
Installing for dependencies:
 m4                                               x86_64                                 1.4.16-10.el7                                  centos-source                                 256 k
 perl-Data-Dumper                                 x86_64                                 2.145-3.el7                                    centos-source                                  47 k

Transaction Summary
============================================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 1.0 M
Installed size: 2.8 M
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                        65 MB/s | 1.0 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
ipa-client-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-12.el7.centos.x86_64
ipa-client-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-12.el7.centos.noarch
ipa-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-12.el7.centos.noarch
  Installing : m4-1.4.16-10.el7.x86_64                                                                                                                                                  1/3 
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                      2/3 
  Installing : autoconf-2.69-11.el7.noarch                                                                                                                                              3/3 
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                      1/3 
  Verifying  : m4-1.4.16-10.el7.x86_64                                                                                                                                                  2/3 
  Verifying  : autoconf-2.69-11.el7.noarch                                                                                                                                              3/3 

Installed:
  autoconf.noarch 0:2.69-11.el7                                                                                                                                                             

Dependency Installed:
  m4.x86_64 0:1.4.16-10.el7                                                              perl-Data-Dumper.x86_64 0:2.145-3.el7                                                             

Complete!
[root@oracle ~]# rpm -ivh rlwrap-0.43-2.el7.x86_64.rpm 
warning: rlwrap-0.43-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
error: Failed dependencies:
    /usr/bin/python3.6 is needed by rlwrap-0.43-2.el7.x86_64
[root@oracle ~]#

在网上查资料,发现centos6用的0.42版本也能安装,测试下:

[root@oracle ~]# rpm -ivh rlwrap-0.42-1.el6.x86_64.rpm 
warning: rlwrap-0.42-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:rlwrap-0.42-1.el6                ################################# [100%]
[root@oracle ~]# 

OK了!

3、配置环境变量

切换到oracle用户,编辑.bash_profile增加

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
[oracle@oracle ~]$ . .bash_profile

4、测试下

Linux 环境下安装rlwrap工具第3张

免责声明:文章转载自《Linux 环境下安装rlwrap工具》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇使用C#实现WinForm窗体的动画效果unity Physics.BoxCast说明下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

GORM高级查询

models nav.go package models type Nav struct { Id int `json:"id"` Title string `json:"title"` Url string `json:"url"` Status int `json:"status"` Sort int...

instanceof 和 isInstance 强转 类型 class [MD]

博文地址 我的GitHub 我的博客 我的微信 我的邮箱 baiqiantao baiqiantao bqt20094 baiqiantao@sina.com 目录 目录 目录 简介 测试 继承关系 测试案例 基本测试 测试多态 测试null 测试数组 测试集合 测试基本类型 打印结果 简介 区别: instance...

SpringBoot 入门

目录 文件结构 pom.xml 主程序 Controller Service 异常处理 配置 自定义注解以及 AOP 拦截器 ApplicationRunner 定时调度 logback-spring.xml 配置日志 Actuator Prometheus 文件结构pom.xml <?xml version="1.0" encoding="UT...

微信公众平台开发(75) 语音识别

本文介绍如何使用微信公众平台高级接口中的语音识别功能,做出一个语音版的天气预报查询功能。根据这个模型,你可以扩展到所有的语音查询。 一、接收语音识别结果 开通语音识别功能以后,用户每次发送语音给公众号时,微信会在推送的语音消息XML数据包中,增加一个Recongnition字段。该字段为语音识别出的文本内容。 用户发送语音: 语音XML数据包如下 <...

LODOP打印插件

HTML代码(请先下载对应LODOP插件安装)  -    打印onclike事件CreatePrintPage()打印函数,LODOP.PREVIEW()打印预览。 <div class="container-fluid"> <object classid="clsid:2105C259-1E0C-4534-8141-A753534CB...

openshift 3.11 安装部署

openshift 3.11 安装部署 openshift安装部署 1 环境准备(所有节点) openshift 版本 v3.11 1.1 机器环境 ip cpu mem hostname OSsystem 192.168.1.130 4 16 master  CentOS7.6 192.168...