PostgreSQL教程:configure: error: readline library not found
在搭建Postgresql测试环境,在安装过程中遇到一个问题,在执行 configure过程中报以下错误,configure: error: readline library
过程中报以下错误,configure: error: readline library not found,同事说已经在系统中安装
readline 包了,让我帮他看下。
1 环境信息
OS: CentOS release 5.2(Final)
PG: postgresql-9.0.0]
2 根据提示,,我测试了下 configre命令,果然报这个错
[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... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
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 of
*** 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 scanner definition files. You can obtain Flex from
*** a GNU mirror site. (If you are using theofficial distribution of
*** 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 the
failure. It is possible the compiler isnt lookingin the proper directory.
Use --without-readline to disable readlinesupport.
根据提示,应该是没有安装 readline包。
3 检查系统是否安装 readline 包
[root@HK81-107postgresql-9.0.0]# rpm -qa | grep readline
readline-5.1-3.el5
说明系统已经安装了 readline包。
4 通过 yum 搜索相关的readline 包
[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.
readline-devel.i386 : Files needed to develop programs which usethe readline library.
readline.i386 : A library for editing typed command lines.
根据提示,有一个包引起了我的注意 "readline-devel",猜想可能与这个包有关。
5 安装 readline-devel 包
[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:2.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.8-46.1 base 56 k
Transaction Summary
=============================================================================
Install 2Package(s)
Update 0Package(s)
Remove 0Package(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:2.0.8-46.1
Complete!
6 再次执行 configure 成功。
7 关于 readline 的解释,来自官网
--without-readline
Prevents use of the Readline library (and libedit as well). Thisoption disables command-line
editing and history in psql, so it is notrecommended.
说明: 根据步骤2 执行 configure时报错提示,可以加上 "--without-readline" 从而避开这个ERROR,
但Postgresql官方不推荐这么做,所以还是安装吧。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL and PostgreSQL: Best Practices in Web Development Introduction: In the modern world of web development, databases are an essential component. When choosing a database, common choices are MySQL and PostgreSQL. This article will cover best practices for using MySQL and PostgreSQL in web development and provide some code examples. 1. Applicable scenarios MySQL is suitable for most web applications, especially those that require high performance, scalability and ease of use.

MySQL and PostgreSQL: Performance Comparison and Optimization Tips When developing web applications, the database is an indispensable component. When choosing a database management system, MySQL and PostgreSQL are two common choices. They are both open source relational database management systems (RDBMS), but there are some differences in performance and optimization. This article will compare the performance of MySQL and PostgreSQL and provide some optimization tips. Performance comparison comparing two database management

MySQL and PostgreSQL: Data Security and Backup Strategies Introduction: In modern society, data has become an indispensable part of business and personal life. For database management systems, data security and backup strategies are crucial, both to protect data from loss or damage and to ensure the reliability and integrity of recovered data. This article will focus on the data security and backup strategies of two mainstream relational database systems, MySQL and PostgreSQL. 1. Data security: (1) User rights

Go language is a fast and efficient programming language suitable for building web services and back-end applications. PostgreSQL is an open source relational database management system that promises to provide higher reliability, scalability and data security. In this article, we’ll take a deep dive into using PostgreSQL with Go and provide some practical code examples and tips. Installing and setting up PostgreSQL First, we need to install and set up PostgreSQL. Can be found on the official website

With the development of database technology, database management systems also present a variety of choices. Developers can choose the most suitable database according to their needs and preferences. As an advanced open source relational database system, PostgreSQL is attracting more and more attention and use by developers. So, how to use PostgreSQL database in PHP programming? 1. Install and configure the PostgreSQL database. Before using PostgreSQL, you need to install and configure it. first

Learn the database functions in the Go language and implement the addition, deletion, modification, and query operations of PostgreSQL data. In modern software development, the database is an indispensable part. As a powerful programming language, Go language provides a wealth of database operation functions and toolkits, which can easily implement addition, deletion, modification and query operations of the database. This article will introduce how to learn database functions in Go language and use PostgreSQL database for actual operations. Step 1: Install the database driver in Go language for each database

With the development of the Internet, the amount of data continues to grow, and the need for data management becomes increasingly urgent. Relational database is an important way of data management, among which PostgreSQL is popular for its flexibility, scalability and security. This article introduces how to use the PHP language to implement an open source PostgreSQL relational database. I hope it will be helpful to developers with corresponding needs. Overview PostgreSQL is a powerful relational database system that follows the SQL standard and has many

MySQL and PostgreSQL: How to optimize database query performance? Overview: Database query performance is an important consideration when developing applications. Good query performance improves application responsiveness and user experience. This article will introduce some methods to optimize database query performance, focusing on two commonly used databases, MySQL and PostgreSQL. Optimization of database indexes: Database indexes are an important factor in improving query performance. Indexes can speed up data search and reduce query scanning time.
