PostgreSQL 正确安装 rum 索引

一、安装 https://github.com/postgrespro/rum 的安装步骤先看是否能安装成功

$ git clone https://github.com/postgrespro/rum
$ cd rum
$ make USE_PGXS=1
$ make USE_PGXS=1 install
$ make USE_PGXS=1 installcheck
$ psql DB -c "CREATE EXTENSION rum;"

二、如有报错,情况如下处理

1)在make USE_PGXS=1报错

① Permission denied

make: execvp: pg_config: Permission denied
make: *** No rule to make target `temp-install', needed by `wal-check'.  Stop.

解决:

chmod 777 -R ./rum             # 根据需要修改该文件的权限

② pg_config : Command not found

make: pg_config: Command not found
make: *** No rule to make target `temp-install', needed by `wal-check'.  Stop.

解决:

yum install postgresql-devel

src/rumsort.c:127:33: fatal error: access/htup_details.h: No such file or directory
 #include "access/htup_details.h"
                                 ^
compilation terminated.
make: *** [src/rumsort.o] Error 1

解决:

export PATH=/usr/local/pgsql/bin:${PATH}            # 配置postgresql的bin安装目录

其他步骤按照一即可,一般不会报错。

你可能感兴趣的:(PostgreSQL)