I am trying to install the Age extension for PostgreSQL-13 by following the instructions in the README file. When I navigate to the extension directory
/Users/moiz/Apache_age/postgresql-13.0/age
and run the command
sudo make USE_PGXS=1 PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config install
,
I get the following error:
make: execvp:
/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config: Permission
denied make: *** No rule to make target `install’. Stop.
I am not sure what is causing this error or how to resolve it. Can anyone provide guidance on what might be going wrong and how to fix it?
Thanks in advance for your help.
6
Answers
You can use the following steps to resolve this issue:
First of all you need to check your user permisions i.e whether you have the access to the PostgreSql files.
Alternatively, you need to set your PG_CONFIG envirnoment variable and confirm that it is set to the correct path. For the setting you can use this command:
Now it will compile and install the required AGE extension for PostgreSQL 13.
I recreated this error on my system and it is because the path to pg_config is not correct. Try using correct path in the make install command as:
created this error on my system and it is because the path to pg_config is not correct. Try using correct path in the make install command as:
sudo make USE_PGXS=1 PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/bin/pg_config install
To fix the "Permission denied" error, you need to grant write/update permission to the directory where you’re trying to install the extension.
Someone asked same question, you can refer to this.
You could try to use a relative path such as
If this doesn’t work then you may have to reconfigure and reinstall postgresql with the command
And then run
And finally try PG_CONFIG again this time set PG_CONFIG to
You might have to use the correct path for your postgresql config file, you can search for the correct path by the following command:
This command should print the full path to the pg_config file. If there is no output, it may be that PostgreSQL is not installed correctly or not in your PATH.