When you build a Postgresql test environment and encounter a problem during installation, execute configure
The following error is reported during the process: configure: error: readline library not found. The colleague said that the system has been installed.
Readline package. Let me check it for him.
1. Environment Information
OS: CentOS release 5.2 (Final)
PG: postgresql-9.0.0]
2. According to the prompt, I tested the configre command. This error is indeed returned.
[Root@HK81-107postgresql-9.0.0] #./configure
Checking build system type... i686-pc-linux-gnu
Checking host system type... i686-pc-linux-gnu
Checking which template to use... linux
Checking whether to build with 64-bit integer date/time support... yes
Checking whether NLS is wanted... no
Checking for default port number... 5432
Checking for block size... 8kB
Checking for segment size... 1 GB
Checking for WAL block size... 8kB
Checking for WAL segment size... 16 MB
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 if gcc supports-Wdeclaration-after-statement... yes
Checking if gcc supports-Wendif-labels... yes
Checking if gcc supports-fno-strict-aliasing... yes
Checking if gcc supports-fwrapv... yes
Checking whether the C compiler still works... yes
Checking how to run the C preprocessor... gcc-E
Checking allow thread-safe client libraries... yes
Checking whether to build with Tcl... no
Checking whether to build Perl modules... no
Checking whether to build Python modules... no
Checking whether to build with GSSAPI support... no
Checking whether to build with Kerberos 5 support... no
Checking whether to build with PAM support... no
Checking whether to build with LDAP support... no
Checking whether to build with Bonjour support... no
Checking whether to build with OpenSSL support... no
Checking for grep that handles long lines and-e.../bin/grep
Checking for egrep.../bin/grep-E
Checking for ld used by GCC.../usr/bin/ld
Checking if the linker (/usr/bin/ld) is GNU ld... yes
Checking for ranlib... ranlib
Checking for strip... strip
Checking whether it is possible to strip libraries... yes
Checking for ar... ar
Checking for tar.../bin/tar
Checking whether ln-s works... yes
Checking for gawk... gawk
Checking for a thread-safe mkdir-p.../bin/mkdir-p
Checking for bison... no
Configure: WARNING:
* ** Without Bison you will not be able to build PostgreSQL from CVSnor
* ** Change any of the parser definition files.You can obtain Bison from
* ** A GNU mirror site.(If you are using theofficial distribution
* ** PostgreSQL then you do not need to worry about this, becausethe Bison
* ** Output is pre-generated .)
Checking for flex... no
Configure: WARNING:
* ** Without Flex you will not be able to build PostgreSQL from CVSnor
* ** Change any of the specified definition files.You can obtain Flex from
* ** A GNU mirror site.(If you are using theofficial distribution
* ** PostgreSQL then you do not need to worry about this because theFlex
* ** Output is pre-generated .)
Checking for perl.../usr/bin/perl
Configure: using perl 5.8.8
Checking for main in-lm... yes
Checking for library containing setproctitle... no
Checking for library containing dlopen...-ldl
Checking for library containing socket... none required
Checking for library containing shl_load... no
Checking for library containing getopt_long... nonerequired
Checking for library containing crypt...-lcrypt
Checking for library containing fdatasync... nonerequired
Checking for library containing gethostbyname_r... nonerequired
Checking for library containing shmget... none required
Checking for-lreadline... no
Checking for-ledit... no
Configure: error: readline library notfound
If you have readline already installed, see config. log for detailson
Failure.It is possible the compiler isnt lookingin the proper directory.
Use -- without-readline to disable readlinesupport.
As prompted, The readline package should not be installed.
3. Check whether the readline package is installed.
[Root@HK81-107postgresql-9.0.0] # rpm-qa | grep readline
Readline-5.1-3.el5
The readline package has been installed.
4 Search for related readline packages using yum
[Root@HK81-107postgresql-9.0.0] # yum search readline
Lftp. i386: A sophisticated file transfer program
Lftp. i386: A sophisticated file transfer program
Php-readline.i386: Standard PHP module provides readline librarysupport
Lftp. i386: A sophisticated file transfer program
Readline. i386: A library for editing typed commandlines.
Compat-readline43.i386: The readline 4.3 library for compatibilitywith older software.
The readline-devel.i386: Files needed to develop programs which usethe readline library.
Readline. i386: A library for editing typed command lines.
According to the prompt, there is a package that caught my attention "readline-devel". It may be related to this package.
5. Install the readline-devel package
[Root@HK81-107postgresql-9.0.0] # yum-y install-y readline-devel
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package readline-devel.i386 0: 5. 1-3.el5 set tobe updated
--> Processing Dependency: libtermcap-devel forpackage: readline-devel
--> Running transaction check
---> Package libtermcap-devel.i386. 0.8-46.1 setto be updated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================== ============================================
Package Arch Version Repository Size
========================================================== ============================================
Installing:
Readline-devel I386 5.1-3. el5 Base 146 k
Installing for dependencies:
Libtermcap-devel I386 2.0.eight-46.1 Base 56 k
Transaction Summary
========================================================== ============================================
Install 2 Package (s)
Update 0 Package (s)
Remove 0 Package (s)
Total download size: 201 k
Downloading Packages:
(1/2): libtermcap-devel-2 100% | ===========================|56kB 00: 00
(2/2): readline-devel-5.1 100% | =========================| 146kB 00: 00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libtermcap-devel ######################## [1/2]
Installing: readline-devel ######################## [2/2]
Installed: readline-devel.i386 0: 5. 1-3.el5
Dependency Installed: libtermcap-devel.i386. 0.8-46.1
Complete!
6. Execute configure again.
7. The readline explanation is from the official website.
-- Without-readline
Prevents use of the Readline library (and libedit as well). Thisoption disables command-line
Editing andHistory in psql, so it is notrecommended.
Note: an ERROR message is displayed when you execute configure in step 2. You can add "-- without-readline" to avoid this ERROR,
But Postgresql does not officially recommend this, So install it.