Самая простая команда для проверки пакета, например pgxn check json_fdw
, не работает:
INFO: best version: json_fdw 1.0.0
INFO: saving /tmp/tmpwblehzox/json_fdw-1.0.0.zip
INFO: unpacking: /tmp/tmpwblehzox/json_fdw-1.0.0.zip
INFO: checking extension
/usr/lib/postgresql/12/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/lib/postgresql/12/bin' --dbname=contrib_regression basic_tests customer_reviews hdfs_block invalid_gz_file
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
psql: error: could not connect to server: FATAL: role "myUser" does not exist
command failed: "/usr/lib/postgresql/12/bin/psql" -X -c "DROP DATABASE IF EXISTS \"contrib_regression\"" "postgres"
/usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk:420: recipe for target 'installcheck' failed
make: *** [installcheck] Error 2
INFO: copying regression.out
INFO: copying regression.diffs
ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config installcheck
Мне нужно express пользователь, пароль, база данных и т. Д. c.
PS: ссылка Guide не существует, http://pgxnclient.projects.postgresql.org/
Обычно для моего env используется psql connectionString
(например, connectionString = "postgres: // postgres:passwd@localhost/byBase "), но pgxn
не принимает его.
Другой пример ошибки
sudo pgxn install json_fdw
INFO: best version: json_fdw 1.0.0
INFO: saving /tmp/tmpinndxvp9/json_fdw-1.0.0.zip
INFO: unpacking: /tmp/tmpinndxvp9/json_fdw-1.0.0.zip
INFO: building extension
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o json_fdw.o json_fdw.c
In file included from json_fdw.c:15:0:
json_fdw.h:22:28: fatal error: nodes/relation.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'json_fdw.o' failed
make: *** [json_fdw.o] Error 1
ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config all
ENV детали
старый сервер UBUNTU 16 LTS
psql --version
= 12,2
pgxn
установлен sudo easy_install pgxnclient
, pgxn --version
= pgxnclient 1.3
на psql "postgres://postgres:passwd@localhost/myBase" -c "select version()"
= PostgreSQL 10.12
для json_fdw
подготовленной упаковки, до pgxn установить , с успехом sudo apt install zlib1g-dev libyajl-dev
.