Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install rlwrap under linux

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to install rlwrap under linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Rlwrap can be used to support the callback function of sqlplus history commands under Oracle to improve efficiency.

1. Download

Download rlwrap-0.37.tar.gz from http://utopia.knoware.nl/~hlub/uck/rlwrap/ and upload it to

Corresponding directory

two。 Installation

[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.

The above error occurs because three installation packages are missing:

Libtermcap-devel-2.0.8-39.i386.rpm

Readline-4.3-13.i386.rpm

Readline-devel-4.3-13.i386.rpm

The above installation packages can be found on the installation CD.

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

Readline-4.3-13

Install the following three packages:

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

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

Check that the installation is successful:

[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] #

Reinstall:

[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 replacement date rlwrap.man after 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 axix / 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. Verify the installation result

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

[oracle@localhost ~] $rlwrap

4. Installation error report

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

Solution:

Add / usr/local/bin path to $PATH path in .bash _ profile under oracle

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

5. Edit the. bash_profile under the oracle user

Increase

Alias sqlplus='rlwrap sqlplus'

Alias rman='rlwrap rman'

This is the end of "how to install rlwrap under linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report