postgres源码编译以及遇到的问题解决

2 篇文章 0 订阅
2 篇文章 0 订阅

1依赖安装

gcc、gcc-c++、zlib-devel、readline-devel

例如: centos7 :

yum install readline-devel

2配置编译

./configure --prefix=目录 CFLAGS=“-O0 -g” --enable-tap-tests --enable-cassert --with-libxml --enable-debug

mke distclean

make install

3启动

到刚才配置的 目录下 找到/bin/
./initdb -D data
./psql postgres

遇到的问题?

congfig遇到的问题以及解决命令

$ ./configure --enable-tap-tests
… fails, whining about IPC::Run
$ sudo yum install perl-IPC-Run
$ ./configure --enable-tap-tests
… fails, whining about prove
… figure out where Fedora hides prove
$ sudo yum install perl-Test-Harness
$ ./configure --enable-tap-tests
… works this time
… make, then
$ make -j check-world
… runs for awhile and then fails
… much excavation finds a complaint about Test::More not being installed
… figure out where Fedora hides Test::More
$ sudo yum install perl-Test-Simple
$ make -j check-world
… runs for awhile and then fails
… much excavation finds a complaint about Time::HiRes not being installed
$ sudo yum install perl-Time-HiRes
$ make -j check-world

问题1:configure: error: dtrace not found
解决方案: yum install systemtap systemtap-sdt-devel

问题2: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 -y

问题3:checking how to link an embedded Python application… configure: error: could not find shared library for Python
解决方案:这个一般的原因是当OS中有多个python版本,需要指定python路径,./configure 参数加上PYTHON=/usr/bin/python2.7 指定python

问题4:configure: error: library ‘pam’ is required for PAM
解决方案:yum install pam pam-devel -y

问题5:configure: error: library ‘xml2’ (version >= 2.6.23) is required for XML support
解决方案:yum install libxml2 libxml2-devel -y

问题6:configure: error: library ‘xslt’ is required for XSLT support
解决方案:yum install libxslt libxslt-devel -y

问题7:make的时候会出现e-secure-openssl.c:1413: PQsslAttribute 的多重定义
fe-secure.o:fe-secure.c:(.text+0x150):第一次在此定义
解决方案:这个一般是因为之前安装过,重新安装的时候会报这个错,解决方法就是在重新安装之前执行一下:make clean

原文链接:https://blog.csdn.net/danqingc/article/details/98486514/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值