欢迎来到阿里云授权服务中心典名科技有限公司!咨询电话:023-66887777 18623333330

微信
手机版
网站地图

linux下怎么安装rlwrap

2021-08-18 11:35:52 投稿人 : admin 围观 : 155 次 0 评论

“linux下怎么安装rlwrap”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

rlwrap 可用来支持Oracle下sqlplus历史命令的回调功能,提高效率。

1、 下载

从http://utopia.knoware.nl/~hlub/uck/rlwrap/下载rlwrap-0.37.tar.gz,然后上传到

相应目录

2.安装

[root@localhost soft]# gzip -d rlwrap-0.37.tar.gz

[root@localhost soft]# tar -xvf rlwrap-0.37.tar

[root@localhost rlwrap-0.37]# ./configure

checking build system type... i686-pc-Linux-gnu

checking host system type... i686-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether make sets $(MAKE)... (cached) yes

checking whether build environment is sane... yes

checking for style of include used by make... GNU

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking dependency style of gcc... gcc3

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking minix/config.h usability... no

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for gcc... (cached) gcc

checking whether we are using the GNU C compiler... (cached) yes

checking whether gcc accepts -g... (cached) yes

checking for gcc option to accept ISO C89... (cached) none needed

checking dependency style of gcc... (cached) gcc3

checking how to run the C preprocessor... gcc -E

checking for perl... /usr/bin/perl

checking for strip... strip

checking for ANSI C header files... (cached) yes

checking for sys/wait.h that is POSIX.1 compatible... yes

checking errno.h usability... yes

checking errno.h presence... yes

checking for errno.h... yes

checking fcntl.h usability... yes

checking fcntl.h presence... yes

checking for fcntl.h... yes

checking libutil.h usability... no

checking libutil.h presence... no

checking for libutil.h... no

checking for stdlib.h... (cached) yes

checking for string.h... (cached) yes

checking sched.h usability... yes

checking sched.h presence... yes

checking for sched.h... yes

checking sys/ioctl.h usability... yes

checking sys/ioctl.h presence... yes

checking for sys/ioctl.h... yes

checking for sys/wait.h... (cached) yes

checking sys/resource.h usability... yes

checking sys/resource.h presence... yes

checking for sys/resource.h... yes

checking stddef.h usability... yes

checking stddef.h presence... yes

checking for stddef.h... yes

checking termios.h usability... yes

checking termios.h presence... yes

checking for termios.h... yes

checking for unistd.h... (cached) yes

checking for stdint.h... (cached) yes

checking time.h usability... yes

checking time.h presence... yes

checking for time.h... yes

checking getopt.h usability... yes

checking getopt.h presence... yes

checking for getopt.h... yes

checking regex.h usability... yes

checking regex.h presence... yes

checking for regex.h... yes

checking curses.h usability... no

checking curses.h presence... no

checking for curses.h... no

checking termcap.h usability... no

checking termcap.h presence... no

checking for termcap.h... no

checking for term.h... no

checking for ncurses/term.h... no

checking argument type of tputs putc function... char

checking whether your getopt() correctly understands double colons in option string... yes

checking for an ANSI C-conforming const... yes

checking for pid_t... yes

checking whether time.h and sys/time.h may both be included... yes

checking whether gcc needs -traditional... no

checking return type of signal handlers... void

checking for getopt_long... yes

checking for getopt_long... (cached) yes

checking for isastream... yes

checking for mkstemp... yes

checking for pselect... yes

checking for putenv... yes

checking for readlink... yes

checking for sched_yield... yes

checking for setenv... yes

checking for setitimer... yes

checking for setsid... yes

checking for setrlimit... yes

checking for sigaction... yes

checking for snprintf... yes

checking for strlcpy... no

checking for strlcat... no

checking for strnlen... yes

checking for system... yes

checking for openpty in -lutil... yes

checking for openpty... yes

checking for getpty... no

checking for grantpt... yes

checking for unlockpt... yes

checking for getpt... yes

checking for pty/tty type... checking pty.h usability... yes

checking pty.h presence... yes

checking for pty.h... yes

OPENPTY

configure: checking for pty ranges...

checking for tgetent... no

checking for tgetent in -lcurses... yes

checking for readline in -lreadline... no

configure: error:

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build

this program!

[root@localhost rlwrap-0.37]# make

make: *** No targets specified and no makefile found.  Stop.

出现上面错误是因为缺少三个安装包:

libtermcap-devel-2.0.8-39.i386.rpm

readline-4.3-13.i386.rpm

readline-devel-4.3-13.i386.rpm

以上安装包在安装光盘中可以找到。

[root@localhost rlwrap-0.37]# rpm -qa|grep read

readline-4.3-13

安装以下三个包:

[root@localhost rpms]# rpm -Uvh readline*

[root@localhost rpms]# rpm -ivh libtermcap-devel-2.0.8-39.i386.rpm

检查是否安装成功:

[root@localhost rpms]# rpm -qa|grep readline

readline-4.3-13

readline-devel-4.3-13

[root@localhost rpms]# rpm -qa|grep libter

libtermcap-2.0.8-39

libtermcap-devel-2.0.8-39

[root@localhost rpms]#

重新安装:

[root@localhost rlwrap-0.37]# ./configure

[root@localhost rlwrap-0.37]# make

make  all-recursive

make[1]: Entering directory `/soft/rlwrap-0.37'

Making all in doc

make[2]: Entering directory `/soft/rlwrap-0.37/doc'

sed -e 's#@DATADIR@#/usr/local/share#'  rlwrap.man > rlwrap.1

make[2]: Leaving directory `/soft/rlwrap-0.37/doc'

Making all in src

make[2]: Entering directory `/soft/rlwrap-0.37/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

string_utils.c: In function `colourless_strlen':

string_utils.c:626: warning: assignment discards qualifiers from pointer target type

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 -lcurses

make[2]: Leaving directory `/soft/rlwrap-0.37/src'

Making all in filters

make[2]: Entering directory `/soft/rlwrap-0.37/filters'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/soft/rlwrap-0.37/filters'

make[2]: Entering directory `/soft/rlwrap-0.37'

make[2]: Nothing to be done for `all-am'.

make[2]: Leaving directory `/soft/rlwrap-0.37'

make[1]: Leaving directory `/soft/rlwrap-0.37'

[root@localhost rlwrap-0.37]#

[root@localhost rlwrap-0.37]# make install

Making install in doc

make[1]: Entering directory `/soft/rlwrap-0.37/doc'

make[2]: Entering directory `/soft/rlwrap-0.37/doc'

make[2]: Nothing to be done for `install-exec-am'.

test -z "/usr/local/share/man/man1" || /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 `/soft/rlwrap-0.37/doc'

make[1]: Leaving directory `/soft/rlwrap-0.37/doc'

Making install in src

make[1]: Entering directory `/soft/rlwrap-0.37/src'

make[2]: Entering directory `/soft/rlwrap-0.37/src'

test -z "/usr/local/bin" || /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 `/soft/rlwrap-0.37/src'

make[1]: Leaving directory `/soft/rlwrap-0.37/src'

Making install in filters

make[1]: Entering directory `/soft/rlwrap-0.37/filters'

make[2]: Entering directory `/soft/rlwrap-0.37/filters'

make[2]: Nothing to be done for `install-exec-am'.

test -z "/usr/local/share/man/man3" || /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 `/soft/rlwrap-0.37/filters'

make[1]: Leaving directory `/soft/rlwrap-0.37/filters'

make[1]: Entering directory `/soft/rlwrap-0.37'

make[2]: Entering directory `/soft/rlwrap-0.37'

make[2]: Nothing to be done for `install-exec-am'.

test -z "/usr/local/share/rlwrap" || /bin/mkdir -p "/usr/local/share/rlwrap"

/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/history_format filters/simple_macro filters/template filters/scrub_prompt filters/paint_prompt filters/censor_passwords filters/listing '/usr/local/share/rlwrap/filters'

/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 `/soft/rlwrap-0.37'

chmod a+x /usr/local/share/rlwrap/filters/*

make[3]: Leaving directory `/soft/rlwrap-0.37'

make[2]: Leaving directory `/soft/rlwrap-0.37'

make[1]: Leaving directory `/soft/rlwrap-0.37'

[root@localhost rlwrap-0.37]#

3、 验证安装结果

[root@localhost rlwrap-0.37]#su – oracle

[oracle@localhost ~]$ rlwrap

4、安装报错

rlwrap: error while loadingshared libraries: libreadline.so.5: cannot open shared object file: No suchfile or directory

解决办法:

在oracle下的.bash_profile中$PATH路径中增加/usr/local/bin路径

PATH=/usr/local/bin:$PATH;export PATH

5、 编辑oracle用户下的.bash_profile

增加

alias sqlplus=’rlwrap sqlplus’

alias rman=’rlwrap rman’


版权声明:本站部分文章内容、图片来源于网友推荐、互联网收集整理而来,仅供大家学习参考,不代表本站立场,如有侵权,请联系站长,我们会第一时间处理!本站原创内容未经允许不得转载,或转载时需注明出处:典名科技资讯门户

相关文章

  • 怎样弄linux查看进程的线程数?
    怎样弄linux查看进程的线程数?

      Linux系统的进程是由线程组成的,当然Linux进程下的线程数是不固定的,可以是一个进程,也可以是多个进程。下面就由和大家讲一讲linux查看进程。进程是一个其中运行着一个或多个线程的地址空间和这些线程所需要的系统资源。一般来说,Li...

    2021-11-17 11:35:33
  • 云服务器的优势
    云服务器的优势

      基于云主机平台构建的一款新型云主机产品,其性能是云主机的性能,同时具备虚拟主机的全部功能。在主机控制面板上还具有服务器重启,CPU、内存、使用空间大小监控等功能。用户独享整个驰云服务器的软硬件资源,通过控制面板进行维护和管理,同时关闭远...

    2021-11-17 11:27:34
  • 微系统架构的特点
    微系统架构的特点

      微系统架构是一项在云中部署应用和服务的新技术。大部分围绕微服务的争论都集中在容器或其他技术是否能很好的实施微服务,而红帽说API应该是重点。微服务可以在“自己的程序”中运行,并通过“轻量级设备与HTTP型API进行沟通”。关键在于该服务...

    2021-11-17 11:20:34
  • 云建站有什么特点?
    云建站有什么特点?

      云建站是最近几年互联网领域兴起的全新的一种互联网基础应用模式,以前存放网站所有的服务器都是单击存在,各种服务之间没有明确的区分,来到云技术时代,随着虚拟化技术的进步,大规模集成式服务开始出现,由之前的单点式服务变为了集群式云服务,人们可...

    2021-11-17 11:13:35
  • 如何使用linux搭建vpn服务器?
    如何使用linux搭建vpn服务器?

      Linux,全称GNU/Linux,是一种免费使用和自由传播的类UNIX操作系统,其内核由林纳斯·本纳第克特·托瓦兹于1991年10月5日首次发布,它主要受到Minix和Unix思想的启发,是一个基于POSIX的多用户、多任务、支持多线...

    2021-11-17 11:09:36
  • 可靠云主机的优点和缺点
    可靠云主机的优点和缺点

      云主机是云计算在基础设施应用上的重要组成部分,位于云计算产业链金字塔底层,产品源自云计算平台。该平台整合了互联网应用三大核心要素:计算、存储、网络,面向用户提供公用化的互联网基础设施服务。云主机是一种类似VPS主机的虚拟化技术, VPS...

    2021-11-17 11:03:36
  • linux查看端口占用情况的步骤
    linux查看端口占用情况的步骤

      准备使用python写一个端口探测的小程序,以检测一些特定的服务端口有没有被占用,突然发现自己居然不知道在linux中如何查询端口被占用的情况,在项目的部署的时候,会遇到端口被占用的情况,需要我们先停下占用端口的进程,然后才能开启新的服...

    2021-11-17 11:01:36
  • tftp服务器软件特点有哪些?tftp服务器软件如何使用?
    tftp服务器软件特点有哪些?tftp服务器软件如何使用?

      tftp是一个传输文件的简单协议,而tftp服务器则可以用于IOS的升级和备份的工作,同时还可以用于文件的传输,现在有一种tftp服务器软件,很多朋友不知道它的情况,下面就来说说tftp服务器软件特点有哪些?tftp服务器软件如何使用。...

    2021-11-17 11:01:35
  • 传真服务器软件角色的步骤
    传真服务器软件角色的步骤

      Windows Server 2008 中的传真服务管理器提供了一个用于配置和管理传真资源的集中管理点。传真服务管理器是在服务器管理器中安装传真服务器角色时安装的。可以使用传真服务管理器为传入和传出传真流量配置传真设备、指定可以使用传真...

    2021-11-17 11:01:35
  • 什么服务器好用?选择服务器要注意什么问题?
    什么服务器好用?选择服务器要注意什么问题?

      什么服务器好用?选择服务器要注意什么问题?很多人在选择服务器产品时一味的看重内存大小,不关注品牌和售后服务问题,其实这个想法有失偏颇。建议大家在选择服务器时还要考虑到宽带以及机房等问题。   一、服务器是什么?   服务器是计算机的一种...

    2021-11-17 11:01:33
发表评论