PostgreSQL源码安装常见依赖包问题及解决

前端之家收集整理的这篇文章主要介绍了PostgreSQL源码安装常见依赖包问题及解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Postgresql源码安装时如果相关依赖包缺失会导致编译失败,以下是常见的依赖包缺失问题,及解决办法。

环境:
OS centos 5.7
DB postgresql 9.1.2

说明:使用centos可以用yum install命令快速安装和更新卸载,用rpm -qa|grep xxx来看某个包是否装上。

总结:yum install -y perl-ExtUtils-Embed readline-devel zlib-develpam-devel libxml2-devel libxslt-devel openldap-devel python-devel gcc-c++ openssl-devel cmake
1.question
checking for flags to link embedded Perl... Can't locate ExtUtils/Embed.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN Failed--compilation aborted.
no
configure: error: could not determine flags for linking embedded Perl.
This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
installed.

solve method:
yum install perl-ExtUtils-Embed


2.question
configure: error: readline library not found
If you have readline already installed,see config.log for details on the
failure.  It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.

solve method:
yum install
readline-5.1-3.el5
readline-devel-5.1-3.el5

3.question
checking for inflate in -lz... no
configure: error: zlib library not found
If you have zlib already installed,see config.log for details on the
failure.  It is possible the compiler isn't looking in the proper directory.
Use --without-zlib to disable zlib support.

solve method
yum install
zlib-1.2.3-4.el5
zlib-devel-1.2.3-4.el5

4.question
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL

solve method
yum install
openssl-devel-0.9.8e-20.el5_7.1.0.1.centos
openssl-0.9.8e-20.el5_7.1.0.1.centos

5.question
checking for pam_start in -lpam... no
configure: error: library 'pam' is required for PAM

solve method
yum install
pam-devel-0.99.6.2-6.el5_5.2
pam-0.99.6.2-6.el5_5.2

6.question
checking for xmlSaveToBuffer in -lxml2... no
configure: error: library 'xml2' (version >= 2.6.23) is required for XML support

solve method:
yum install
libxml2-devel-2.6.26-2.1.12.el5_7.2
libxml2-2.6.26-2.1.12.el5_7.2

7.question
checking for xsltCleanupGlobals in -lxslt... no
configure: error: library 'xslt' is required for XSLT support

solve method
yum install
libxslt-devel-1.1.17-2.el5_2.2
libxslt-1.1.17-2.el5_2.2

8.question
checking for ldap.h... no
configure: error: header file  is required for LDAP

solve method
openldap-2.3.43-12.el5_7.10
openldap-devel-2.3.43-12.el5_7.10

9.question
checking for Python.h... no
configure: error: header file  is required for Python

solve method
yum install python-devel


10.question
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.

solve method
yum install gcc-c++

猜你在找的Postgre SQL相关文章