在作业安装pgadmin3的时候在执行 configure 过程中报以下错误,configure: error: readline library not found,提示缺少包readline动态库,也就说该包不存在或者不完
然后我查了下系统包:
[root@Postgresql ~]# rpm -qa | grep readline
readline-6.0-4.el6.x86_64
说明系统有readline包
通过 yum 搜索相关的 readline 包
[root@HK81-107 postgresql-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 library support
lftp.i386 : A sophisticated file transfer program
readline.i386 : A library for editing typed command lines.
compat-readline43.i386 : The readline 4.3 library for compatibility with older software.
readline-devel.i386 : Files needed to develop programs which use the readline library.
readline.i386 : A library for editing typed command lines.
根据提示,有一个包引起了我的注意 "readline-devel", 猜想可能与这个包有关。
安装 readline-devel 包
[root@HK81-107 postgresql-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 to be updated
--> Processing Dependency: libtermcap-devel for package: readline-devel
--> Running transaction check
---> Package libtermcap-devel.i386 0:2.0.8-46.1 set to 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 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 201 k
Downloading Packages:
(1/2): libtermcap-devel-2 100% |=========================| 56 kB 00:00
(2/2): readline-devel-5.1 100% |=========================| 146 kB 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!
再次执行 configure 成功。
[root@Postgresql ~]# yum search readline
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.pubyun.com
* extras: mirrors.pubyun.com
* updates: mirrors.pubyun.com
==================================================================================== N/S Matched: readline ====================================================================================
compat-readline5-devel.i686 : Files needed to develop programs which use the readline library
compat-readline5-devel.x86_64 : Files needed to develop programs which use the readline library
compat-readline5-static.x86_64 : Static libraries for the readline library
libreadline-java-javadoc.x86_64 : Javadoc for libreadline-java
readline-devel.i686 : Files needed to develop programs which use the readline library
readline-devel.x86_64 : Files needed to develop programs which use the readline library
readline-static.x86_64 : Static libraries for the readline library
compat-readline5.i686 : A library for editing typed command lines
compat-readline5.x86_64 : A library for editing typed command lines
libreadline-java.x86_64 : Java wrapper for the EditLine library
perl-Term-UI.x86_64 : Term::ReadLine UI made easy
readline.i686 : A library for editing typed command lines
readline.x86_64 : A library for editing typed command lines
Name and summary matches only, use "search all" for everything.
关于 readline 的解释,来自官网
--without-readline
Prevents use of the Readline library (and libedit as well). This option disables command-line
editing and history in psql, so it is not recommended.
说明: 根据执行 configure 时报错提示,可以加上 "--without-readline" 从而避开这个ERROR,
但Postgresql官方不推荐这么做,所以还是安装吧。