首页 数据库 mysql教程 PostgreSQL教程:configure: error: readline library not found

PostgreSQL教程:configure: error: readline library not found

Jun 07, 2016 pm 05:11 PM
postgresql

在搭建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官方不推荐这么做,所以还是安装吧。

本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
2 周前 By 尊渡假赌尊渡假赌尊渡假赌
仓库:如何复兴队友
4 周前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
3 周前 By 尊渡假赌尊渡假赌尊渡假赌

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

MySQL和PostgreSQL:在Web开发中的最佳实践 MySQL和PostgreSQL:在Web开发中的最佳实践 Jul 14, 2023 pm 02:34 PM

MySQL和PostgreSQL:在Web开发中的最佳实践引言:在现代的Web开发领域中,数据库是必不可少的组成部分。在选择数据库时,常见的选择是MySQL和PostgreSQL。本文将介绍在Web开发中使用MySQL和PostgreSQL的最佳实践,并提供一些代码示例。一、适用场景MySQL适用于大多数Web应用程序,特别是那些需要高性能、可扩展性和易于使

MySQL和PostgreSQL:性能对比与优化技巧 MySQL和PostgreSQL:性能对比与优化技巧 Jul 13, 2023 pm 03:33 PM

MySQL和PostgreSQL:性能对比与优化技巧在开发web应用程序时,数据库是不可或缺的组成部分。而在选择数据库管理系统时,MySQL和PostgreSQL是两个常见的选择。他们都是开源的关系型数据库管理系统(RDBMS),但在性能和优化方面有一些不同之处。本文将比较MySQL和PostgreSQL的性能,并提供一些优化技巧。性能对比在比较两个数据库管

如何在PHP编程中使用PostgreSQL数据库? 如何在PHP编程中使用PostgreSQL数据库? Jun 12, 2023 am 09:27 AM

随着数据库技术的发展,数据库管理系统也呈现出多种多样的选择,开发人员可以根据自己的需求和喜好选择最适合自己的数据库。而PostgreSQL作为一种先进的开源关系型数据库系统,越来越受到开发人员的关注和使用。那么,在PHP编程中如何使用PostgreSQL数据库呢?一、安装和配置PostgreSQL数据库在使用PostgreSQL之前,需要先安装和配置它。首先

MySQL和PostgreSQL:数据安全与备份策略 MySQL和PostgreSQL:数据安全与备份策略 Jul 13, 2023 pm 03:31 PM

MySQL和PostgreSQL:数据安全与备份策略引言:在现代社会中,数据成为了企业和个人生活中不可或缺的一部分。对于数据库管理系统来说,数据安全与备份策略是至关重要的,既能保护数据免受丢失或损坏,也能确保恢复数据的可靠性和完整性。本文将重点讨论MySQL和PostgreSQL两种主流关系型数据库系统的数据安全性和备份策略。一、数据安全性方面:(一)用户权

在Go语言中使用PostgreSQL:完整指南 在Go语言中使用PostgreSQL:完整指南 Jun 18, 2023 am 09:28 AM

Go语言是一种快速、高效的编程语言,适合构建Web服务和后端应用程序。而PostgreSQL是一个开源的关系型数据库管理系统,承诺提供更高的可靠性、可扩展性和数据安全性。在本文中,我们将深入探讨如何在Go语言中使用PostgreSQL,并提供一些实用的代码示例和技巧。安装和设置PostgreSQL首先,我们需要安装和设置PostgreSQL。可以在官方网

学习Go语言中的数据库函数并实现PostgreSQL数据的增删改查操作 学习Go语言中的数据库函数并实现PostgreSQL数据的增删改查操作 Jul 31, 2023 pm 12:54 PM

学习Go语言中的数据库函数并实现PostgreSQL数据的增删改查操作在现代的软件开发中,数据库是不可或缺的一部分。Go语言作为一门强大的编程语言,提供了丰富的数据库操作函数和工具包,可以轻松地实现数据库的增删改查操作。本文将介绍如何学习Go语言中的数据库函数,并使用PostgreSQL数据库进行实际的操作。第一步:安装数据库驱动程序在Go语言中,每个数据库

PHP实现开源PostgreSQL关系型数据库 PHP实现开源PostgreSQL关系型数据库 Jun 18, 2023 am 08:40 AM

随着互联网的发展,数据量持续增长,数据管理的需求变得日益迫切。关系型数据库是数据管理的一种重要方式,而其中的PostgreSQL因其灵活性、可扩展性及安全性而备受欢迎。本文介绍了如何利用PHP语言实现一个开源的PostgreSQL关系型数据库,希望对有相应需求的开发者有所帮助。概述PostgreSQL是一种强大的关系型数据库系统,它是遵循SQL标准的且具有许

MySQL和PostgreSQL:如何优化数据库查询性能? MySQL和PostgreSQL:如何优化数据库查询性能? Jul 12, 2023 pm 03:15 PM

MySQL和PostgreSQL:如何优化数据库查询性能?概述:在开发应用程序时,数据库查询性能是一个重要的考虑因素。良好的查询性能可以提高应用程序的响应速度和用户体验。本文将介绍一些优化数据库查询性能的方法,重点涵盖MySQL和PostgreSQL两种常用数据库。数据库索引的优化:数据库索引是提高查询性能的重要因素。索引可以加快数据的查找速度,减少查询时扫

See all articles