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

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

MySQL與PostgreSQL:效能比較與最佳化技巧在開發web應用程式時,資料庫是不可或缺的組成部分。而在選擇資料庫管理系統時,MySQL和PostgreSQL是兩個常見的選擇。他們都是開源的關係型資料庫管理系統(RDBMS),但在效能和最佳化方面有一些不同之處。本文將比較MySQL和PostgreSQL的效能,並提供一些最佳化技巧。性能對比在比較兩個資料庫管

MySQL和PostgreSQL:在Web開發中的最佳實務引言:在現代的Web開發領域中,資料庫是不可或缺的組成部分。在選擇資料庫時,常見的選擇是MySQL和PostgreSQL。本文將介紹在Web開發中使用MySQL和PostgreSQL的最佳實踐,並提供一些程式碼範例。一、適用場景MySQL適用於大多數Web應用程序,特別是那些需要高性能、可擴展性和易於使

學習Go語言中的資料庫函數並實作PostgreSQL資料的增刪改查操作在現代的軟體開發中,資料庫是不可或缺的一部分。 Go語言作為一門強大的程式語言,提供了豐富的資料庫操作函數和工具包,可以輕鬆實現資料庫的增刪改查操作。本文將介紹如何學習Go語言中的資料庫函數,並使用PostgreSQL資料庫進行實際的操作。第一步:安裝資料庫驅動程式在Go語言中,每個資料庫

MySQL和PostgreSQL:如何優化資料庫查詢效能?概述:在開發應用程式時,資料庫查詢效能是一個重要的考慮因素。良好的查詢效能可以提高應用程式的回應速度和使用者體驗。本文將介紹一些最佳化資料庫查詢效能的方法,重點涵蓋MySQL和PostgreSQL兩種常用資料庫。資料庫索引的最佳化:資料庫索引是提高查詢效能的重要因素。索引可以加快資料的查找速度,減少查詢時掃

MySQL與PostgreSQL:資料安全與備份策略引言:在現代社會中,資料成為了企業和個人生活中不可或缺的一部分。對於資料庫管理系統來說,資料安全與備份策略是至關重要的,既能保護資料免受遺失或損壞,也能確保恢復資料的可靠性和完整性。本文將重點放在MySQL和PostgreSQL兩種主流關係型資料庫系統的資料安全性和備份策略。一、資料安全性方面:(一)用戶權

資料庫容量規劃與擴展:MySQLvs.PostgreSQL引言:隨著網際網路的快速發展和大數據時代的到來,資料庫的容量規劃和擴展變得越來越重要。 MySQL和PostgreSQL是兩個流行的關聯式資料庫管理系統(RDBMS),它們在資料庫容量規劃和擴充方面有著不同的特性和適用場景。本文將對這兩個資料庫進行比較,並給出一些程式碼範例來展示它們的差異。一、MySQ

隨著資料庫技術的發展,資料庫管理系統也呈現出多種多樣的選擇,開發人員可以根據自己的需求和喜好選擇最適合自己的資料庫。而PostgreSQL作為一種先進的開源關係型資料庫系統,越來越受到開發人員的關注與使用。那麼,在PHP程式設計中如何使用PostgreSQL資料庫呢?一、安裝和設定PostgreSQL資料庫在使用PostgreSQL之前,需要先安裝並設定它。首先

Go語言是一種快速、有效率的程式語言,適合建立Web服務和後端應用程式。而PostgreSQL是一個開源的關聯式資料庫管理系統,承諾提供更高的可靠性、可擴展性和資料安全性。在本文中,我們將深入探討如何在Go語言中使用PostgreSQL,並提供一些實用的程式碼範例和技巧。安裝和設定PostgreSQL首先,我們需要安裝和設定PostgreSQL。可以在官方網
