安装下rlwrap,最新版本是0.43
下载地址 https://fossies.org/linux/privat/rlwrap-0.43.tar.gz/
```
安装rlwrap
tar -zxvf rlwrap-0.43.tar.gz
[root@openguess soft]# ll
total 298864
-rw------- 1 omm dbgrp 1234 Apr 8 10:30 cluster_config_opendb.xml
drwx------. 15 root root 4096 Apr 8 10:32 lib
drwxr-xr-x. 4 omm dbgrp 30 Apr 8 10:32 openGauss
-r--------. 1 root root 101382908 Apr 7 15:39 openGauss-2.0.0-CentOS-64bit-all.tar.gz
-r--------. 1 root root 65 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit-om.sha256
-r--------. 1 root root 12646330 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit-om.tar.gz
-r--------. 1 root root 65 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit.sha256
-r--------. 1 root root 89573052 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit.tar.bz2
-r-------- 1 root root 101944654 Apr 8 10:32 openGauss-Package-bak_78689da9.tar.gz
drwxrwxr-x 8 asas asas 323 Mar 3 2017 rlwrap-0.43
-rw-r--r-- 1 root root 313139 Jul 24 2020 rlwrap-0.43.tar.gz
drwx------. 6 root root 4096 Mar 31 21:16 script
drwxr-xr-x. 2 root root 4096 Mar 31 21:16 simpleInstall
-r--------. 1 root root 65 Mar 31 21:15 upgrade_sql.sha256
-r--------. 1 root root 133704 Mar 31 21:15 upgrade_sql.tar.gz
-r-------- 1 root root 32 Mar 31 21:14 version.cfg
[root@openguess soft]# mv rlwrap-0.43 /usr/local/rlwrap
[root@openguess soft]# cd /usr/local/rlwrap/
[root@openguess rlwrap]# ll
total 448
-rw-rw-r-- 1 asas asas 42141 Mar 3 2017 aclocal.m4
-rw-rw-r-- 1 asas asas 910 Mar 2 2017 AUTHORS
-rw-rw-r-- 1 asas asas 2965 Aug 30 2016 BUGS
-rw-rw-r-- 1 asas asas 105 Aug 30 2016 ChangeLog
drwxrwxr-x 2 asas asas 38 Mar 3 2017 completions
-rw-rw-r-- 1 asas asas 8682 Mar 3 2017 config.h.in
-rwxrwxr-x 1 asas asas 250121 Mar 3 2017 configure
-rw-rw-r-- 1 asas asas 18451 Mar 3 2017 configure.ac
-rw-rw-r-- 1 asas asas 17992 Aug 30 2016 COPYING
drwxrwxr-x 2 asas asas 65 Mar 3 2017 doc
drwxrwxr-x 2 asas asas 4096 Mar 3 2017 filters
-rw-rw-r-- 1 asas asas 4083 Feb 13 2017 INSTALL
-rw-rw-r-- 1 asas asas 1838 Feb 26 2017 Makefile.am
-rw-rw-r-- 1 asas asas 41793 Mar 3 2017 Makefile.in
-rw-rw-r-- 1 asas asas 22209 Mar 2 2017 NEWS
-rw-rw-r-- 1 asas asas 1398 Feb 12 2017 PLEA
-rw-rw-r-- 1 asas asas 3113 Jan 30 2017 README
drwxrwxr-x 2 asas asas 308 Mar 3 2017 src
drwxrwxr-x 2 asas asas 38 Mar 3 2017 test
-rw-rw-r-- 1 asas asas 236 Sep 4 2016 TODO
drwxrwxr-x 2 asas asas 126 Mar 3 2017 tools

[root@openguess rlwrap]# ./configure -q
Will rlwrap find command's working directory under /proc/<commands pid>/cwd? let's see...

Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it

```
注意linux7 最小安装会报
checking for tgetent in -ltermcap... no
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

```
需要yum install readline-devel -y 就可以

```
make && make install
```

[root@openguess rlwrap]# make && make install
make all-recursive
make[1]: Entering directory `/usr/local/rlwrap'
Making all in doc
make[2]: Entering directory `/usr/local/rlwrap/doc'
sed -e 's#@DATADIR@#/usr/local/share#' rlwrap.man > rlwrap.1
make[2]: Leaving directory `/usr/local/rlwrap/doc'
Making all in src
make[2]: Entering directory `/usr/local/rlwrap/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT signals.o -MD -MP -MF .deps/signals.Tpo -c -o signals.o signals.c
mv -f .deps/signals.Tpo .deps/signals.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c
mv -f .deps/readline.Tpo .deps/readline.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT pty.o -MD -MP -MF .deps/pty.Tpo -c -o pty.o pty.c
mv -f .deps/pty.Tpo .deps/pty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT completion.o -MD -MP -MF .deps/completion.Tpo -c -o completion.o completion.c
mv -f .deps/completion.Tpo .deps/completion.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT term.o -MD -MP -MF .deps/term.Tpo -c -o term.o term.c
mv -f .deps/term.Tpo .deps/term.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT ptytty.o -MD -MP -MF .deps/ptytty.Tpo -c -o ptytty.o ptytty.c
mv -f .deps/ptytty.Tpo .deps/ptytty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
mv -f .deps/utils.Tpo .deps/utils.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT string_utils.o -MD -MP -MF .deps/string_utils.Tpo -c -o string_utils.o string_utils.c
mv -f .deps/string_utils.Tpo .deps/string_utils.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT malloc_debug.o -MD -MP -MF .deps/malloc_debug.Tpo -c -o malloc_debug.o malloc_debug.c
mv -f .deps/malloc_debug.Tpo .deps/malloc_debug.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT filter.o -MD -MP -MF .deps/filter.Tpo -c -o filter.o filter.c
mv -f .deps/filter.Tpo .deps/filter.Po
gcc -DDATADIR=\"/usr/local/share\" -g -O2 -o rlwrap main.o signals.o readline.o pty.o completion.o term.o ptytty.o utils.o string_utils.o malloc_debug.o filter.o -lutil -lreadline -ltinfo
make[2]: Leaving directory `/usr/local/rlwrap/src'
Making all in filters
make[2]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/rlwrap/filters'
make[2]: Entering directory `/usr/local/rlwrap'
make[2]: Leaving directory `/usr/local/rlwrap'
make[1]: Leaving directory `/usr/local/rlwrap'
Making install in doc
make[1]: Entering directory `/usr/local/rlwrap/doc'
make[2]: Entering directory `/usr/local/rlwrap/doc'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/man/man1'
/usr/bin/install -c -m 644 rlwrap.1 '/usr/local/share/man/man1'
make[2]: Leaving directory `/usr/local/rlwrap/doc'
make[1]: Leaving directory `/usr/local/rlwrap/doc'
Making install in src
make[1]: Entering directory `/usr/local/rlwrap/src'
make[2]: Entering directory `/usr/local/rlwrap/src'
/usr/bin/mkdir -p '/usr/local/bin'
/usr/bin/install -c rlwrap '/usr/local/bin'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/rlwrap/src'
make[1]: Leaving directory `/usr/local/rlwrap/src'
Making install in filters
make[1]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/man/man3'
/usr/bin/install -c -m 644 RlwrapFilter.3pm '/usr/local/share/man/man3'
make[2]: Leaving directory `/usr/local/rlwrap/filters'
make[1]: Leaving directory `/usr/local/rlwrap/filters'
make[1]: Entering directory `/usr/local/rlwrap'
make[2]: Entering directory `/usr/local/rlwrap'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/rlwrap'
/usr/bin/mkdir -p '/usr/local/share/rlwrap/filters'
/usr/bin/install -c -m 644 filters/README filters/RlwrapFilter.pm filters/RlwrapFilter.3pm filters/count_in_prompt filters/pipeto filters/logger filters/null filters/unbackspace filters/pipeline filters/ftp_filter filters/handle_hotkeys filters/history_format filters/simple_macro filters/template filters/scrub_prompt filters/paint_prompt filters/censor_passwords filters/listing filters/paint_prompt.py filters/handle_hotkeys.py filters/logger.py filters/pipeto.py filters/rlwrapfilter.py filters/null.py filters/censor_passwords.py filters/count_in_prompt.py filters/ftp_filter.py '/usr/local/share/rlwrap/filters'
/usr/bin/mkdir -p '/usr/local/share/rlwrap/completions'
/usr/bin/install -c -m 644 completions/testclient completions/coqtop '/usr/local/share/rlwrap/completions'
make install-data-hook
make[3]: Entering directory `/usr/local/rlwrap'
chmod a+x /usr/local/share/rlwrap/filters/*
make[3]: Leaving directory `/usr/local/rlwrap'
make[2]: Leaving directory `/usr/local/rlwrap'
make[1]: Leaving directory `/usr/local/rlwrap'
[root@openguess rlwrap]#
```
添加环境变量
```
su - omm
vi .bashrc
alias gsql='rlwrap gsql'

```

rlwrap解决opengauss,pg,oracle上下左右及回退乱码的更多相关文章

  1. Oracle sqlplus中退格键、DEL键、上下左右键无法使用乱码问题

    功能描述:Oracle sqlplus中退格键.DEL键.上下左右键无法使用乱码 1.安装readline-8.0 ①下载readline-8.0.tar.gz文件,百度网盘下载路径: https:/ ...

  2. oracle安装界面中文乱码解决

    在安装oracle时如果我们用的是英文安装没有任何问题,但是我要安装中文的,结果中文界面就出现了乱码了,后来网上找了原因是要安装中文包才可以,下面我来介绍一下. 在Linux的X window里安装o ...

  3. 解决在Linux下安装Oracle时的中文乱码问题

    本帖最后由 TsengYia 于 2012-2-22 17:06 编辑 解决在Linux下安装Oracle时的中文乱码问题 操作系统:Red Hat Enterprise Linux 6.1数据库:O ...

  4. C#.NET ORM FreeSql 读取使用 US7ASCII 的 Oracle 数据库中文显示乱码问题

    前言 关于 Oracle US7ASCII 中文乱码的问题,Ado.Net 和 Odbc 无法解决.包括最新的.Net Core..NET6..NET7 都无法解决这个问题. FreeSql 对 Or ...

  5. [转]解决IIS下UTF-8文件报错乱码的问题

    找了两天才找到解决办法…….晕晕晕...用第二种方法解决了. 网上找到的方法都没有写这一条 If objASPError.ASPDescription > "" Then 后 ...

  6. 解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG

    解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG zoerywzhou@163.com http://www.cnblogs.com/swje/ 作者:Zhouwan 2017-6 ...

  7. Ubuntu下解决解压zip文件中文文件名乱码问题

    在Ubuntu下解压Windows下压缩的zip文件时,会出现解压出的带中文文件名的文件名乱码,这是因为Ubuntu和Windows默认的编码不同,Ubuntu下默认的编码是UTF-8,而Window ...

  8. 解决@ResponseBody注解返回的json中文乱码问题

    1. 简介 主要解决@ResponseBody注解返回的json中文乱码问题. 2.解决方案 2.1mvc加上注解(推荐此方法) 在mvc配置文件中假如下面配置(写在 <mvc:annotati ...

  9. 15、解决14中csv用excel打开乱码的问题 open('zhihu.csv','w',newline='',encoding='utf-8-sig')

    解决14中csv用excel打开乱码的问题 ,其实就是在写csv的时候把 utf-8 改成 utf-8-sig open('zhihu.csv','w',newline='',encoding='ut ...

  10. 解决pycharm左侧项目文件名中文字体乱码情况?中文显示口口口口.

    解决pycharm左侧项目文件名中文字体乱码情况?中文显示口口口口. 点击file,进入settings 出现 Appearance & Behavior 点击Appearance UI Op ...

随机推荐

  1. 新项目决定用 JDK 17了

    大家好,我是风筝,公众号「古时的风筝」,专注于 Java技术 及周边生态. 文章会收录在 JavaNewBee 中,更有 Java 后端知识图谱,从小白到大牛要走的路都在里面. 最近在调研 JDK 1 ...

  2. 速记·python 123章

    第一.二.三章 初识python 1.1 Python的概述 开发环境:Python 开发工具:IDLE(Python自带) 1.python的特点:代码简单.开发速度快.容易学习:有丰富的库:&qu ...

  3. 编写异步任务@Async出现bean无法注入的问题解决方案

    在编写一个异步任务时出现报错:"The bean 'asyncShenCe' could not be injected as a 'com.sinochem.api.service.imp ...

  4. Vue前后端分离实现登录的一个简单demo

    1.建立一个Maven项目,并添加Spring相关依赖 2.编写Controller类相应的接口和配置类 LoginController类,编写接口的业务逻辑 package com.springbo ...

  5. [OpenCV实战]52 在OpenCV中使用颜色直方图

    颜色直方图是一种常见的图像特征,顾名思义颜色直方图就是用来反映图像颜色组成分布的直方图.颜色直方图的横轴表示像素值或像素值范围,纵轴表示该像素值范围内像素点的个数或出现频率.颜色直方图属于计算机视觉中 ...

  6. JAVA中使用最广泛的本地缓存?Ehcache的自信从何而来2 —— Ehcache的各种项目集成与使用初体验

    大家好,又见面了. 本文是笔者作为掘金技术社区签约作者的身份输出的缓存专栏系列内容,将会通过系列专题,讲清楚缓存的方方面面.如果感兴趣,欢迎关注以获取后续更新. 在上一篇文章<JAVA中使用最广 ...

  7. Spark详解(07) - SparkStreaming

    Spark详解(07) - SparkStreaming SparkStreaming概述 Spark Streaming用于流式数据的处理. Spark Streaming支持的数据输入源很多,例如 ...

  8. Windowsのcmd命令

    Windowsのcmd命令 网络操作: ipconfig命令: ipconfig -all 查看网络信息 ipconfig -release 释放ip/tcp ipconfig -renew 重新获取 ...

  9. SOFAJRaft模块启动过程

    本篇文章旨在分析SOFAJRaft中jraft-example模块的启动过程,由于SOFAJRaft在持续开源的过程中,所以无法保证示例代码永远是最新的,要是源代码有较大的变动,亦或出现纰漏.错误的地 ...

  10. Java基础学习笔记-流程控制

    Java程序结构 顺序结构 分支选择结构 循环结构 顺序结构 分支选择结构 if-else Switch case Switch case 注意点 要配合break,要不就会一直往下走 case 值必 ...