postgrespro/pg_wait_sampling

compile error

ramazangok opened this issue · 3 comments

Hi All,

I am taking like below error. Could you make a suggestion to resolve that error

[root@replica pg_wait_sampling-1.1]$echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/pgsql-11/bin:/usr/pgsql-11/bin:/usr/pgsql-11/bin/pg_config

[root@replica pg_wait_sampling-1.1]$ sudo make USE_PGXS=1 install
make: pg_config: Command not found
make: *** No rule to make target `install'. Stop.

Hi!

Last two terms in $PATH variable /usr/pgsql-11/bin:/usr/pgsql-11/bin/pg_config are redundant. pg_config tool is in postgresql-server-dev package that not installed with standard postgresql-server one. So I recommend you to 1) check existence of pg_config binary inside /usr/pgsql-11/bin, 2) install postgresql-server-dev if it's not exist there, 3) refine $PATH definition

Hi @ramazangok !

Did the suggestions above help you? Can I close the issue?

Note also that your problem is likely that the $PATH is different when using sudo. You could use the -E sudo option to preserve your environment variables.