Unable to install on MacOS
pranshuchittora opened this issue · 2 comments
Hey, I have been trying to install pgtap
on my Mac machine for a while but unable to do so successfully.
I have Postgres.app install installed and when I try to run make in the cloned pgtap dir, I get the following error
GNUmake running against Postgres version 15.3, with pg_config located at /opt/homebrew/opt/libpq/bin
Makefile:126: /opt/homebrew/opt/libpq/lib/postgresql/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `/opt/homebrew/opt/libpq/lib/postgresql/pgxs/src/makefiles/pgxs.mk'. Stop.
The error you're seeing is related to the pg_config
location. To fix this, we need to set the PG_CONFIG
environment variable to the correct path. It seems like your computer is still addressing the Homebrew installation location, which is causing the issue.
Here's what you can do:
Find the location of pg_config
by running which pg_config
in your terminal and set the PG_CONFIG
environment variable using the copied path. Then try running the make command again.
This should help make
find the correct location of pg_config
, and the installation should proceed without errors.
@IshaanAdarsh's right, you have to Postgres instances installed, Postgres.app and Homebrew, and your path points to Homebrew. You will need to set your path to the Postgres.app utilities. See the Postgres.app CLI docs for details.