PostgreSQL编译安装常见报错整理

PostgreSQL源码安装时如果相关依赖包缺失会导致编译失败,以下是常见的依赖包缺失问题,及解决办法。

依赖安装:

yum install -y perl-ExtUtils-Embed readline-devel zlib-devel pam-devel libxml2-devel libxslt-devel openldap-devel python-devel gcc-c++   openssl-devel cmake

问题1:

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.

configure: error: could not determine flags for linking embedded Perl.This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not installed.

解决:

yum install perl-ExtUtils-Embed

问题2:

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.

解决:

yum install readline  readline-devel

问题3:

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.

解决:

yum install zlib zlib-devel

问题4:

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

解决:

yum -y install opensll openssl-devel

问题5:

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

解决:

yum -y install pam pam-devel

问题6:

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

解决:

yum -y install libxml2 libxml2-devel

问题7:

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

解决:

yum -y install libxslt  libxslt-devel

问题8:

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

解决:

yum -y install openldap  openldap-devel

问题9:

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

解决:

yum -y install python-devel

问题10:

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.

解决:

yum -y install gcc-c++

插件报错:

2020-05-06 06:17:12.624 UTC [1] FATAL:  could not access file "pglogical": No such file or directory
2020-05-06 06:17:12.624 UTC [1] LOG:  database system is shut down

解决参考: https://www.cnblogs.com/lottu/p/10972773.html , pg_pathman: https://www.cnblogs.com/guoxiangyue/p/10894467.html

1 个评论

https://dba.stackexchange.com/questions/225446/postgres-fatal-could-not-access-file-pglogical-no-such-file-or-directory

要回复文章请先登录注册