十年DB两茫茫、不思量,自难忘。漫漫长夜,加班话沧桑。纵使相逢应不识,尘满面,鬓如霜。
writer : starhu
PGSQL 安装包获取地址如下:
https://www.postgresql.org/ftp/source/
1)解压缩安装包
tar -xvf postgresql-11.2.tar.gz
2)安装依赖环境
yum install libxml2 libxml2-devel perl-ExtUtils-Embed libxslt libxslt-devel openssl openssl-devel zlib zlib-devel pam pam-devel openldap openldap-devel python python-devel gcc-c++
3)编译
./configure --prefix=/usr/local/postgres --with-wal-segsize=512 --with-wal-blocksize=16 --with-pgport=5432 --with-segsize=1 --with-blocksize=8 --with-libedit-preferred --with-perl --with-openssl --with-libxml --with-libxslt --enable-thread-safety --enable-nls=en_US.UTF-8
6)安装
make && make install
1)问题1:
no
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)问题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)问题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)问题4:
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL
解决方法:
yum install openssl openssl-devel
(5)问题5:
checking for pam_start in -lpam... no
configure: error: library 'pam' is required for PAM
解决方法:
yum install pam pam-devel
(6)问题6:
checking for xmlSaveToBuffer in -lxml2... no
configure: error: library 'xml2' (version >= 2.6.23) is required for XML support
解决方法:
yum install libxml2 libxml2-devel
(7)问题7:
checking for xsltCleanupGlobals in -lxslt... no
configure: error: library 'xslt' is required for XSLT support
解决方法:
yum install libxslt libxslt-devel
(8)问题8:
configure: error: Tcl shell not found
解决方法:
yum install tcl tcl-devel
(9)问题9:
checking for ldap.h... no
configure: error: header file is required for LDAP
解决方法:
yum install openldap openldap-devel
(10)问题10:
checking for Python.h... no
configure: error: header file <Python.h> is required for Python
解决方法:
yum install python python-devel
(11)问题11:
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 install gcc-c++