rlwrap解决opengauss,pg,oracle上下左右及回退乱码
安装下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上下左右及回退乱码的更多相关文章
- Oracle sqlplus中退格键、DEL键、上下左右键无法使用乱码问题
功能描述:Oracle sqlplus中退格键.DEL键.上下左右键无法使用乱码 1.安装readline-8.0 ①下载readline-8.0.tar.gz文件,百度网盘下载路径: https:/ ...
- oracle安装界面中文乱码解决
在安装oracle时如果我们用的是英文安装没有任何问题,但是我要安装中文的,结果中文界面就出现了乱码了,后来网上找了原因是要安装中文包才可以,下面我来介绍一下. 在Linux的X window里安装o ...
- 解决在Linux下安装Oracle时的中文乱码问题
本帖最后由 TsengYia 于 2012-2-22 17:06 编辑 解决在Linux下安装Oracle时的中文乱码问题 操作系统:Red Hat Enterprise Linux 6.1数据库:O ...
- C#.NET ORM FreeSql 读取使用 US7ASCII 的 Oracle 数据库中文显示乱码问题
前言 关于 Oracle US7ASCII 中文乱码的问题,Ado.Net 和 Odbc 无法解决.包括最新的.Net Core..NET6..NET7 都无法解决这个问题. FreeSql 对 Or ...
- [转]解决IIS下UTF-8文件报错乱码的问题
找了两天才找到解决办法…….晕晕晕...用第二种方法解决了. 网上找到的方法都没有写这一条 If objASPError.ASPDescription > "" Then 后 ...
- 解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG
解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG zoerywzhou@163.com http://www.cnblogs.com/swje/ 作者:Zhouwan 2017-6 ...
- Ubuntu下解决解压zip文件中文文件名乱码问题
在Ubuntu下解压Windows下压缩的zip文件时,会出现解压出的带中文文件名的文件名乱码,这是因为Ubuntu和Windows默认的编码不同,Ubuntu下默认的编码是UTF-8,而Window ...
- 解决@ResponseBody注解返回的json中文乱码问题
1. 简介 主要解决@ResponseBody注解返回的json中文乱码问题. 2.解决方案 2.1mvc加上注解(推荐此方法) 在mvc配置文件中假如下面配置(写在 <mvc:annotati ...
- 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 ...
- 解决pycharm左侧项目文件名中文字体乱码情况?中文显示口口口口.
解决pycharm左侧项目文件名中文字体乱码情况?中文显示口口口口. 点击file,进入settings 出现 Appearance & Behavior 点击Appearance UI Op ...
随机推荐
- NGINX的配置和基本使用
Linux NGINX NGINX:engine X ,2002年开发,分为社区版和商业版(nginx plus ) 社区版:分为主线版(开发版,奇数),稳定版(偶数) Nginx官网:http:// ...
- 实现 .Net 7 下的数据库定时检查
在软件开发过程中,有时候我们需要定时地检查数据库中的数据,并在发现新增数据时触发一个动作.为了实现这个需求,我们在 .Net 7 下进行一次简单的演示. PeriodicTimer .Net 6 中新 ...
- 丧心病狂,竟有Thread.sleep(0)这种神仙写法?
前言 最近在网上看到了一段代码,让我感到很迷茫.他在代码中使用了 Thread.sleep(0),让线程休眠时间为0秒,具体代码如下. int i = 0; while (i<10000000) ...
- eclipse打不开maven项目中的pom.xml
1.问题描述 在eclipse中我双击打开maven项目中的pom.xml报错. 2.产生原因 正如报错中描述的那样"Failed to create the part's controls ...
- Kali Win-KeX SL
内容: 概述 先决条件 用法 开始 声音支持 多屏支持 停止 概述 无缝模式下的 Win-KeX 将在 Windows 桌面的屏幕顶部启动 Kali Linux 面板. 通过面板启动的应用程序将与 M ...
- 主题 2 Shell工具和脚本
主题 2 Shell工具和脚本 Shell 工具和脚本 · the missing semester of your cs education (missing-semester-cn.github. ...
- DVWA靶场实战(七)——SQL Injection
DVWA靶场实战(七) 七.SQL Injection: 1.漏洞原理: SQL Inject中文叫做SQL注入,是发生在web端的安全漏洞,主要是实现非法操作,例如欺骗服务器执行非法查询,他的危害在 ...
- Entrypoint undefined = index.html html-webpack-plugin 错误ERROR in Error: Child compilation failed: Module build failed (from ./node_modules/html-webpack-plu SyntaxError: Unexpected token )
Entrypoint undefined = index.html html-webpack-plugin 错误 ERROR in Error: Child compilation failed: M ...
- ffmpeg拉取rtsp视频流
公司项目需要提供实时显示网络摄像头实时视频. void RTSPFFmpeg::rtsp_open(const char *url) { AVFormatContext* format_ctx = a ...
- 报错One record is expected, but the query result is multiple records
总结:出现这种情况,显而易见,就是查询的数据在数据库中不止一条,而我调用的selectOne方法,返回值是一个User对象,导致报错 点击查看错误代码 LambdaQueryWrapper<Us ...