/contrib/contrib-global.mk: No such file or directory

来源:互联网 发布:网络编辑主要做什么的 编辑:程序博客网 时间:2024/05/18 02:10

postgresql 安装插件时提示找不到~global.mk

当postgresql 安装插件时,遇到了/contrib/contrib-global.mk:

打开MakeFile

ifdef USE_PGXSPG_CONFIG = pg_configPGXS := $(shell $(PG_CONFIG) --pgxs)include $(PGXS)elsesubdir = contrib/pg_freespacemaptop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mkendif

看到第一行有个判断,判断是否定义了USE_PGXS参数
PGXS参数可以见pg官网。

所以,可以在make 的时候加上USE_PGXS就可以了

make USE_PGXS=1
make USE_PGXS=1 install

问题解决

问题分支
有可能会出现这个问题:

make: pg_config: Command not found

出现这个原因是你没有把相应的bin目录加到环境变量中

linux

export PATH=$PATH:$PGHOME/bin

PGHOME为你的数据库安装目录
bin 为你的pg_config所在目录

问题再一次解决

1 0
原创粉丝点击