我想在我的pgAudit 6 32位上安装CentOS,我已经从从DBEnterprise下载的PostgreSQL Linux运行安装程序中安装了PostgreSQL 10 + pgAdmin4。
我遵循了这里的指南,下面是我遵循的步骤:
git clone https://github.com/postgres/postgres.gitcd postgres进入文件夹,然后按git checkout REL_10_STABLE./configure之后的make install -scd contribgit clone https://github.com/pgaudit/pgaudit.git扩展cd pgauditgit checkout REL_10_STABLEmake -s checkmake install我被困在第八步了。结果是:
[root@localhost pgaudit]# make -s check
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine /root/postgres/contrib/pgaudit/log/initdb.log for the reason.
Command was: "initdb" -D "/root/postgres/contrib/pgaudit/./tmp_check/data" --no-clean --no-sync > "/root/postgres/contrib/pgaudit/log/initdb.log" 2>&1
make: *** [check] Error 2我按照它告诉我的方式打开了initdb.log at /root/postgres/contrib/pgaudit/log/initdb.log,它说:
Running in no-clean mode. Mistakes will not be cleaned up.
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.因此,在以postgres身份登录后,我再试一次,结果如下:
bash-4.1$ make -s check
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[2]: *** [submake-errcodes] Error 2
make[1]: *** [submake-libpgport] Error 2
make: *** [submake] Error 2我对Linux和PostgreSQL都很陌生,所以我不知道为什么失败,以及解决这个问题的方法是什么。提前感谢!
发布于 2022-05-11 11:25:54
看起来就像您的db用户没有登录shell。
你可以尝试:
sudo -u postgres psql template或者:
sudo -u postgres bashhttps://stackoverflow.com/questions/52518994
复制相似问题