首页 > 数据库 >rlwrap解决opengauss,pg,oracle上下左右及回退乱码

rlwrap解决opengauss,pg,oracle上下左右及回退乱码

时间:2024-02-19 19:44:05浏览次数:22  
标签:asas rlwrap make 乱码 usr filters oracle local

安装下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'

标签:asas,rlwrap,make,乱码,usr,filters,oracle,local
From: https://www.cnblogs.com/xinxin1222/p/18021818

相关文章

  • 若依微服务框架RuoYi-Cloud-Oracle本地运行并部署搭建
    我一开始去若依官网学习,去Gitee上面下载的是RuoYi-Cloud若依微服务版本发现是mysql库,按照若依官方文档我运行了起来,没有啥太大的问题,但是我想要oracle版本,又去网上找了找终于在github上面找到了https://github.com/yangzongzhuan/RuoYi-Cloud-Oracle?tab=readme-ov-file我就clo......
  • Linux下oracle数据库安装
    1.环境准备:关闭防火墙,禁用开机自启防火墙关闭selinux配置网络IP静态地址添加组groupadddbagroupaddoinstall创建Oracle用户:useradd-d/home/oracle-goinstall-Gdba-moracle设计密码: passwdoracle 创建Oracle目录 mkdir-p/u01/app/oracle/product/11......
  • PostgreSQL提示信息乱码
    在win11环境下部署开发环境,安装pgsql16后测试连接正常,系统终端环境下提示信息正常显示。但在vscode中与数据库连接工具中发现数据库返回的提示信息乱码,虽不影响使用但看着实在别扭所以想着处理下。在查阅相关资料后发现,配置文件postgresql.conf中的lc_messages参数值为lc_mes......
  • Q:Oracle表空间使用权限错误:ORA-01950
    使用A用户账号(默认表空间tablespace_A),A用户表中插入数据报错ORA-01950报错处理方法:方法1:授予用户A unlimitedtablespace权限grantunlimitedtablespacetoA;方法2:分配表空间使用配额alteruserAquotaunlimitedontablespace_A;注意:unlimitedtablespace可以对......
  • [转帖]Oracle NUMBER Data Type
    https://www.oracletutorial.com/oracle-basics/oracle-number-data-type/ Summary:inthistutorial,youwilllearnabouttheOracle NUMBER datatypeandhowtouseittodefinenumericcolumnsforatable.IntroductiontoOracleNUMBERdatatypeTheOrac......
  • Oracle Java SE Product Releases
    1.gotothemainpage[https://www.oracle.com/]2.thenclick'Products'tochoosetheJavaicon3.clickthe'OracleJavaSEPlatform'icon[https://www.oracle.com/java/]4.repeattheactionasbelow[https://www.oracle.com/java/t......
  • 解决Oracle11g区分大小写问题
    连接到:OracleDatabase11gEnterpriseEditionRelease11.2.0.1.0-ProductionWiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptionsSQL>showparametersec_case_sensitive_logonNAMETYPEVALU......
  • [转帖]Oracle number类型详解
    Oraclenumber类型详解简介基本说明容易出错情况Number与MySQL数据类型简介Oracle的number类型比较复杂,很多限制,但是掌握一点小技巧就能轻松搞定。基本说明number(precision,scale)precision表示数字中的有效位,从左边第一个不为0的数算起,小数点和负号不计入有效......
  • 创建企业级地理数据库oracle
    创建oracle地理数据库sde之前写过一篇在postgres数据库中创建sde的教程,由于工作需求,现需要在oracle数据库中创建sde并连接使用,现把主要步骤记录下来,以备后续查看方便。有一说一,开源的postgres数据库创建sde不要太方便,关键是人家还有自己的PostGIS插件以支持空间数据表达,闭源的or......
  • 创建企业级地理数据库oracle
    创建oracle地理数据库sde之前写过一篇在postgres数据库中创建sde的教程,由于工作需求,现需要在oracle数据库中创建sde并连接使用,现把主要步骤记录下来,以备后续查看方便。有一说一,开源的postgres数据库创建sde不要太方便,关键是人家还有自己的PostGIS插件以支持空间数据表达,闭源的or......